MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 1045 (28000): SOLUTION WORKED for me
Posted by: Sri K
Date: January 20, 2010 09:30AM

Folks I see a lot of confused users. The key was the way we start mysql. Here is what worked for me:

1. Check the current parameters used for your mysql daemon:
>ps -ef | grep mysql
root 5835 1 0 09:48 pts/3 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/

2. Stop mysql:
>sudo /etc/init.d/mysqld stop

3. Restart with all your flags + --skip-grant-tables (ALL ONE COMMAND):
NOTE: YOUR FLAGS might be different
>sudo /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-fil
e=/var/run/mysqld/ --skip-grant-tables &

4. Get into command line client:
>mysql -u root mysql

5. Change the password for root (I used OLD_PASSWORD for 5.0.45) & FLUSH:
mysql>UPDATE user SET Password=OLD_PASSWORD('NEW_PASSWORD') where USER='root';

6. Stop mysql daemon:
>sudo /etc/init.d/mysqld stop

7. Start mysql daemon as it was earlier:
>sudo /etc/init.d/mysqld start

8. Now get in using the new password:
>mysql -u root -p

Thanks to all the above users. It helped me get this solution, which worked for me.

Options: ReplyQuote

Written By
June 27, 2009 08:29PM
December 16, 2007 02:18AM
December 27, 2007 02:08PM
January 16, 2011 06:51AM
August 27, 2009 12:22AM
Re: ERROR 1045 (28000): SOLUTION WORKED for me
January 20, 2010 09:30AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.