MySQL user not created

Discussion in 'Installation/Configuration' started by Matthéo Geoffray, Nov 20, 2015.

  1. Matthéo Geoffray

    Matthéo Geoffray New Member

    Hello,

    I have an OVH Kimsufi server with ISPConfig Version: 3.0.5.4p8 installed on it.
    Debian GNU/Linux 7.9 / PHP 5.4.45-0+deb7u2 (cli) / MySQL Ver 14.14 Distrib 5.5.46, for debian-linux-gnu
    Since a little while (maybe last update) I can't handle my database user form Ispconfig.
    The databases are created but the users are not.

    Here is the process that I do:

    Users :
    Sites > Database Users > Add new User
    Client : xxxxx
    Database user : myuser
    Database password : mypwd
    > Save

    Databases
    Sites > Databases > Add new database
    Serveur : nsXXXX
    Site : yyyyyyyy.fr
    Type : MySQL
    Database name : mydb
    Username : myuser
    > Save

    At this point I connect to my MySQL instance with my "root" user
    mysql -u root -pzzzzzzzzzzz

    SHOW DATABASES; show me my "mydb" database
    However USE mysql; SELECT user,host FROM user; is not showing me my "myuser" user...

    If I take a look into logs in /var/log/ispconfig/ispconfig.log I can see creation lines
    20.11.2015-13:29 - DEBUG - Calling function 'db_user_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_user_insert'.
    20.11.2015-13:29 - DEBUG - Processed datalog_id 607
    20.11.2015-13:29 - DEBUG - Calling function 'db_user_update' from plugin 'mysql_clientdb_plugin' raised by event 'database_user_update'.
    20.11.2015-13:29 - DEBUG - Processed datalog_id 608
    20.11.2015-13:29 - DEBUG - Calling function 'db_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_insert'.
    20.11.2015-13:29 - DEBUG - Created MySQL database: mydb
    20.11.2015-13:29 - DEBUG - GRANT for user myuser at host localhost
    20.11.2015-13:29 - DEBUG - GRANT ALL ON mydb.* TO 'myuser'@'localhost' IDENTIFIED BY PASSWORD '*XXXXX'; success? no
    20.11.2015-13:29 - DEBUG - Processed datalog_id 609
    20.11.2015-13:29 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    20.11.2015-13:30 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock


    If I try to create user from MySQL instance that work well
    CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'xxxx'; => OK

    When I try to grant privileges I have an error
    GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'localhost';
    => ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mydb'
    If I try to grant privileges to my "root" user error again
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'zzzz' WITH GRANT OPTION;
    => ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Here is the rigths for my user "root" SHOW GRANTS FOR 'root'@'localhost';
    | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, 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 ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '***********' |
    | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |


    Sorry for the long message but I tried to be the most precise.
    That's where I'm stuck my expertise ends here! [​IMG]

    Hope that I can find a solution here.

    Thanks !
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that the mysql root user password in /usr/local/ispconfig/server/lib/mysql_clientdb.conf is correct and check your root user with phpmyadmin to ensure that it has all available rights for this database server.
     
  3. Matthéo Geoffray

    Matthéo Geoffray New Member

    Hello Till,
    yes I forgot to say that my user / password are goods in /usr/local/ispconfig/server/lib/mysql_clientdb.conf.
    How can I check that ? This is not with the command SHOW GRANTS FOR 'root'@'localhost'; in my first post ?
    Thank you.
     
  4. Matthéo Geoffray

    Matthéo Geoffray New Member

    Well... Nice community no response in two months.
    Thanks for you help !
    Good continuation.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm sorry, there is no guarantee for an answer when questions are posted outside of the priority support forum as your company has not the financial resources to employ enough admins to answer all support for free. If you are in need of an answer, then please post in the priority support forum or contact the business support.

    Back to your question. Check the rights of the mysql root user either on the shell or in phpmyadmin and ensure that this user has all available permissions. your issue is not ispconfig related, yif your root user has a limitation that prevents that root can grant priveliges for new users, then no software that adds mysql users by using this root account will work.
     
  6. WolfgangPue

    WolfgangPue New Member

    Had the same problem. ISPConfig created the database but not the database user. Checked the mysql log and there was a mysql_upgrade command necessary to fix the issue.
     

Share This Page