Hey d00p,
All of the above had been done and still it was not working.
But, we have read somewhere that maybe a restart of the server could solve our problems, and it worked.
Now, we are facing a problem with a customer creating a database.
We have configured froxlor with mysql user 'froxloruser' with GRANTS to froxlor database.
mysql> SHOW GRANTS FOR 'froxloruser'#'localhost';
+------------------------------------------------------------------+
| Grants for froxloruser#localhost |
+------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `froxloruser`#`localhost` |
| GRANT ALL PRIVILEGES ON `froxlor`.* TO `froxloruser`#`localhost` |
+------------------------------------------------------------------+
2 rows in set (0.00 sec)
And with 'froxloradmin' with GRANTS to everything, as a superuser.
mysql> SHOW GRANTS FOR 'froxloradmin'#'localhost';
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for froxloradmin#localhost
|
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `froxloradmin`#`localhost`
|
| GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `froxloradmin`#`localhost` |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
We have changed /var/www/froxlor/lib/userdata.inc.php to use 'localhost' instead of '127.0.0.1'.
But the error we get, when we click create database is the following.
A database error occurred
SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'froxloradmin'#'localhost' to database 'stagingsql1'
#0 /var/www/froxlor/lib/Froxlor/Database/Database.php(83): PDOStatement->execute()
#1 /var/www/froxlor/lib/Froxlor/Database/Manager/DbManagerMySQL.php(106): Froxlor\Database\Database::pexecute()
#2 /var/www/froxlor/lib/Froxlor/Database/DbManager.php(105): Froxlor\Database\Manager\DbManagerMySQL->grantPrivilegesTo()
#3 /var/www/froxlor/lib/Froxlor/Api/Commands/Mysqls.php(82): Froxlor\Database\DbManager->createDatabase()
#4 /var/www/froxlor/customer_mysql.php(150): Froxlor\Api\Commands\Mysqls->add()
#5 {main}
GRANT ALL ON `stagingsql1`.* TO :username#:host
When we check mysql, there are database and user created, but the user's host is 127.0.0.1, not localhost.