当前位置:Gxlcms > mysql > mysqlERROR1045(28000):Accessdeniedforuser'ro

mysqlERROR1045(28000):Accessdeniedforuser'ro

时间:2021-07-01 10:21:17 帮助过:18人阅读

mysql 安装后,登录报错,虽然安装时设置了密码。 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决方法: # mysql -u root mysql mysql UPDATE user SET Password=PASSWORD('newpassword') where USER='root'; m

mysql 安装后,登录报错,虽然安装时设置了密码。

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

解决方法:

# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysqld restart

在命令行再次修改后,重启mysql服务即可。

人气教程排行