好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

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

MySQL5.7登录报1045解决方式

标签:nbsp   loading   数据库   mys   load   刷新   using   文件中   set   

查看更多关于MySQL5.7登录报1045解决方式的详细内容...

  阅读:34次