首页 >数据库 >mysql教程 >MySQL ERROR 1045 (28000)的解决方法

MySQL ERROR 1045 (28000)的解决方法

WBOY
WBOY原创
2016-06-07 16:14:33999浏览

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) # /etc/init.d/mysql stop # mysqld_safe --user=mysql --skip-grant-tables --skip-networking # mysql -u root mysql mysql UPDATE user SET Password=PASSWORD('new

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn