Friday 14 December 2012

Mysql ERROR 1045 (28000) in centos


To resolve Mysql "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) in Centos"

Please Refer the following Steps:-

Solution-:

 [root@linuxnotes~]# /etc/init.d/mysqld stop
 [root@linuxnotes~]# mysqld_safe --skip-grant-tables &
 [root@linuxnotes~]# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit

Note:-

Before restarting the mysql service first kill all mysqld related process and then start mysqld service.

 [root@linuxnotes~]# /etc/init.d/mysqld stop
 [root@linuxnotes~]# /etc/init.d/mysqld start

No comments:

Post a Comment