mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

一、问题:

www.zeeklog.com  - mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

二、解决办法

1.在mysql安装目录下找到mysql.ini(或my.ini)

www.zeeklog.com  - mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

2.找到my.ini 添加

skip-grant-tables
www.zeeklog.com  - mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

3.停止服务后再开启

1.net stop mysql
2.net startmysql
www.zeeklog.com  - mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题

再次登录:

注意要到mysql安装目录下的bin文件夹 执行

mysql -u root -p

输入密码就好了。

www.zeeklog.com  - mySql登录出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)问题