Home > Database > Mysql Tutorial > body text

mysql ERROR 1045 (28000): Access denied for user 'ro

WBOY
Release: 2016-06-07 15:52:28
Original
963 people have browsed it

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服务即可。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!