Access denied for user
Hello,
Using: cPanel / WHM 92.0 (build 9)
Error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Purpose: attempting to import large DB (not an option to use phpMyAdmin).
I've added a new database and user via the cPanel account page (MySQL Databases). I can access phpMyAdmin without issue. But I am unable to access the DB via SSH using mysql -u root -p. The same goes for if I try to mysql -u new_account_made_with_cpanel -p. The error is the same (as above).
I've tried going in to phpMyAdmin via cPanel > phpMyAdmin (meaning, not at account level but main dashboard where I can see all of my accounts). I then flush privileges, no change. I also did 'DELETE FROM mysql.user WHERE User='';', no change.
I'm not very experienced and unsure what to do to debug further. Any guidance is greatly appreciated.
Thank you
-
Hey there! It seems like access for the root user may be broken on that system, as I would expect root to have full access to MySQL and all the tools on the machine. Can you try to fix this through our automated tool in WHM >> MySQL Root Password? This will attempt a reset of the MySQL root user password on the system, and may be enough to get that resolved for you. 0 -
Hey there! It seems like access for the root user may be broken on that system, as I would expect root to have full access to MySQL and all the tools on the machine. Can you try to fix this through our automated tool in WHM >> MySQL Root Password? This will attempt a reset of the MySQL root user password on the system, and may be enough to get that resolved for you.
Hi @cPRex, thank you kindly for the reply. I have tried, a couple of times (via WHM), but it makes no impac whatsover - same error.0 -
Seems I found the issue - password. I don't mean I had the wrong password, but rather, either the password length I had (99 chars) or some character(s) in the password that was randomly generated by my password storage program was accepted by cPanel but then borked by mysql cli. Once I clipped it down to 75 it worked. I didn't do any testing beyond this to determine whether it was an issue with length or "bad" characters. Thank you for your time and help 0 -
I'm glad you were able to track that down! Historically, MySQL user passwords were limited to 41 characters but newer versions do allow more. 0 -
thank you again, @cPRex. 0 -
You're welcome! 0
Please sign in to leave a comment.
Comments
6 comments