Unable to connect to mysqlAccess denied for user 'root'@'localhost'

Discussion in 'General' started by m2hewitt, Jun 29, 2017.

  1. m2hewitt

    m2hewitt New Member

    Dear guys,

    I have not changed anything and from one day it does not process the requirements that I make for the databases, showing this errror:
    Unable to connect to mysqlAccess denied for user 'root'@'localhost'

    using root user and passwd with mysql -u root works OK
    using root user and passwd with Phpmyadmin works OK

    the password on /usr/local/ispconfig/server/lib/mysql_clientdb.conf is ok

    but when tried to run create databases on ISPCONFIG show error.
    Any idea?
    REgards,
     
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you update mariadb/mysql?
    you can try this in mysql:
    update mysql.user set plugin = 'mysql_native_password' where user='root';
     
  3. m2hewitt

    m2hewitt New Member

    Thanks for your reply, tried with your command:
    MariaDB [(none)]> update mysql.user set plugin = 'mysql_native_password' where user='root';
    Query OK, 3 rows affected (0.00 sec)
    Rows matched: 3 Changed: 3 Warnings: 0

    but when i tried again, i have the same error on ispconfig log.

    Yes, i did update some days ago, this is the versions installed:

    [​IMG]
    Regards,
     
  4. m2hewitt

    m2hewitt New Member

    thank in advance who can help me, I need to work and I am stopped by this problem.

    Regards,
     
  5. m2hewitt

    m2hewitt New Member

    Anyone can help me?

    Regards,
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you restart mysql or run flush privileges after you applied the change that Florian suggested to apply the change?
     
  7. m2hewitt

    m2hewitt New Member


    Thanks for your reply.

    i did the restart mysql and still showing the error:

    03.07.2017-12:33 - DEBUG - Found 2 changes, starting update process.
    03.07.2017-12:33 - DEBUG - Calling function 'db_user_update' from plugin 'mysql_clientdb_plugin' raised by event 'database_user_update'.
    03.07.2017-12:33 - ERROR - Unable to connect to mysqlAccess denied for user 'root'@'localhost' (using password: YES)
    03.07.2017-12:33 - DEBUG - Processed datalog_id 542
    03.07.2017-12:33 - DEBUG - Calling function 'db_insert' from plugin 'mysql_clientdb_plugin' raised by event 'database_insert'.
    03.07.2017-12:33 - ERROR - Unable to connect to mysqlAccess denied for user 'root'@'localhost' (using password: YES)
    03.07.2017-12:33 - DEBUG - Processed datalog_id 543
    03.07.2017-12:33 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
     
  8. Turbanator

    Turbanator Member HowtoForge Supporter

    I had a similar issue with mysql 5.6 on jessie recently, but I can't remember everything I did to fix it. Run a repair all tables first and them myisamchk...I recall doing these a few times especially for mysql.user. Something that comes to mind is it telling me the field count doesn;t match what was expected. From there, I'll have to research more.
     
  9. Turbanator

    Turbanator Member HowtoForge Supporter

    after doing a repair, I think I did mysql_upgrade. you may or may not have to Grant again but I cant recall.
     

Share This Page