其实就是两个办法,最终都是为了修改 user 表中 root 对应的 host 字段为 %
1. update user set host='%' where user='root';
flush privileges;
这种方法不用理会root的密码
2. grant all on *.* to root@'%' identified by '123456';
*.* 指定给了所有数据库了。
1. update user set host='%' where user='root';
flush privileges;
这种方法不用理会root的密码
2. grant all on *.* to root@'%' identified by '123456';
*.* 指定给了所有数据库了。
1万+

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



