YOU RECEIVE:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
First kill the instance :
ISSUE THE COMMAND: kill `cat /var/run/mysqld/mysqld.pid`
Next start the mysql server instance or daemon with the --skip-grant-tables option as seen below:
/usr/bin/mysqld_safe --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid
--skip-grant-tables
--datadir=/var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid &
Next get into the MYSQL shell and issue the next three commands:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('your_new_password') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
AGAIN, ISSUE THE COMMAND: kill `cat /var/run/mysqld/mysqld.pid`
Restart the instance/daemon /etc/rc.d/init.d/mysqld start
Connect with your new password.
# mysql -u root -p
Enter password: your_new_password
tags: mysql mysql admin open source open
links: digg this del.icio.us technorati reddit