- 进入mysql
-
mysql -uroot -p;
- 允许ip为100.64.25.217(看你项目使用的那个mysql ip 你就设置那个)用root用户来访问test4下面的所有的表使用的密码是123456:
-
grant all privileges on test4.* to 'root'@'100.64.25.217' identified by '123456' with grant option;
- 让授权生效:
-
flush privileges;
- 允许所有人都能访问你的数据库:
-
grant all privileges on test4.* to 'root'@'%' identified by '123456' with grant option;
- 让授权生效:
-
flush privileges;
ubuntu mysql怎么设置远程访问
猜你喜欢
转载自blog.csdn.net/zsx1314lovezyf/article/details/89765035
今日推荐
周排行