切换到mysql的mysql数据库,找到user表;
cmd:mysql -u root -p
cmd:use mysql;
cmd:select host,user,password from user;
更新user表信息:
cmd:update user set host = ‘%‘ where user = ‘root‘;
为root用户授权密码为root:
cmd:grant all privileges on *.* to [email protected]‘%‘ identified by ‘root‘;
刷新权限:
cmd:flush privileges;
时间: 2024-10-18 02:41:20