恢复 root 本地无权限 Access denied for user 'root'@'localhost' (using password: NO)

时间:2023-03-09 08:06:35
恢复 root 本地无权限  Access denied for user 'root'@'localhost' (using password: NO)

调试远程的时候,覆盖了本地的权限。导致  本地无法登陆系统表。  远程连接上mysql  执行以下命令恢复。

恢复root  本地管理权限  使用空密码

grant all on *.* to root@'localhost' identified by password '' with grant option;

root远程 也可以连接  使用空密码

grant all on *.* to root@'%' identified by password '' with grant option;