mysql Access denied

Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决

这种问题需要强行重新修改密码,方法如下:

/etc/init.d/mysql stop   (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外开个SSH连接
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql>exit

猜你喜欢

转载自feilong2483.iteye.com/blog/2359366