954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can't login to mysql using putty

When I type in: "mysqladmin -u root -p" and enter the password I get reset I get the message:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

newbie26
Light Poster
38 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

Hello,

Quick note in case you are not aware of this. The system root user and the MySQL root user are two entirely different accounts and passwords. Even though they are both called root the MySQL password is stored in the application and the system root password is stored in /etc/shadow. The system root user does not have root privleges in MySQL and the MySQL root user does not have system root privdgles.

If you were already aware of this then either you have the wrong password for root or the host is incorrect. If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:

mysqladmin -u root password NEWPASSWORD

You could try root@127.0.0.1 or if you have system root access to the box then there is a procedure that allows you to reset MySQL root to what ever you want. http://www.thegeekstuff.com/2009/07/how-to-reset-forgot-mysql-root-password-on-unix-linux-windows/

rch1231
Posting Shark
959 posts since Sep 2009
Reputation Points: 119
Solved Threads: 142
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You