MySQL5.7登录报1045解决方式


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

这个意思是说:用户“root”@本地主机的访问被拒绝

 

1、首先修改my.ini,在文件中加入skip-grant-tables,重新启动MySQL服务

 

 

2、cmd    输入 mysql -u root -p  出现enter password直接回车

3、use mysql

 

 4、修改密码: update mysql.user set authentication_string=password('root@123456') where user='root' and host='localhost";

 

 5、flush privileges;      //刷新数据库

 6、注释掉

skip-grant-tables

 7、重新启动MySQL


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM