当前位置:Gxlcms > mysql > mysql登录遇到ERROR1045问题解决方法_MySQL

mysql登录遇到ERROR1045问题解决方法_MySQL

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

bitsCN.com 在Windows系统中,mysql登录的时候出现了这样的错误:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

从网上找了一些办法,终于得到了解决,现在记录一下具体的解决方法:

c:/>sc stop mysql
c:/>mysqld --defaults-file="C:/MySQL/MySQLServer6.0/my.ini" --console --skip-grant-tables

重新开一个cmd

c:/>mysql -uroot -p
enter password: <- 回车
mysql>UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit
bitsCN.com

人气教程排行