Skip to main content

MySQL 5.7 phpmyadmin failed access for root user only

Comments

4 comments

  • cPanelLauren
    Hi @martin MHC The issues noted in the thread you linked are a part of an internal case which is linked in the thread. Are you seeing any errors in the cPanel error logs or the mysql error logs? Also, can you access mysql with the root user/password? mysql -u root -p
    Can you also confirm whether or not there is a password stored at /root/.my.cnf
    and if it matches the one you've changed to
    0
  • martin MHC
    Hello, Sorry I should have put in the original post - yes MySQL connects with the correct password on the CLI. And yes the .my.cnf file also shows the correct password. As far as can be established the only issue is that PhpMyAdmin does not use the correct password or doesn't understand the password with non-alpha-numeric characters: !="%. I have found on a few other systems (including on WHM that passwords can "break" when using the sterling key (") ). With the password updated to remove the % and " characters, PhpMyAdmin appears to load correctly every time, @cPanelLauren this SOLVES this issue (for me). p.s> PhpMyAdmin appears to be using the password in double quotes "..." rather than single quotes '...' which can effect how the string is interpreted in PHP.
    0
  • cPanelLauren
    Hi @martin MHC I believe I'm able to replicate this with the " symbol only. Is the error you were getting: mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) Undefined index: auth_type
    Can you tell me where in the password the % symbol was? I tried to replicate with this but was unable to.
    0
  • martin MHC
    Hi @martin MHC I believe I'm able to replicate this with the " symbol only. Is the error you were getting: mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) Undefined index: auth_type
    Can you tell me where in the password the % symbol was? I tried to replicate with this but was unable to.

    Hello Yes that looks like the error. I think the issue is just the " symbol and the % is ok, in this case. My password was a randomly generated string containing those two characters . I don't have it now as I have updated it. I suspect the issue is to do with MySQL table collations as the " symbol is not formed correctly on iso-8859-1, in MySQL and therefore becomes ? (or similar ).
    0

Please sign in to leave a comment.