Access denied for user 'root'@'localhost' (using password: yes)
关于修改mysql密码
1.在mysql安装目录下的my.ini 文件中加入代码 skip-grant-table;(设置无密码登入)
2.重启mysql. net stop mysql; net start mysql mysql -uroot - p 直接enter进入
3.在MySQL 5.7 password字段已从mysql.user表中删除,新的字段名是“authenticalion_string”.
选择数据库:use mysql;
更新root的密码:update user set authentication_string=password('新密码') where user='root' and Host='localhost'; (这里的新密码开始用了字母不行的话可以用下数字)
刷新权限:flush privileges;
42.重启mysql. net stop mysql; net start mysql
本文指导如何在MySQL 5.7中修改root用户的密码,包括在my.ini中临时禁用授权表、使用无密码登录、修改authentification_string字段,以及重启和刷新权限的过程。
1446

被折叠的 条评论
为什么被折叠?



