首页 > 代码库 > mysql增加远程访问权限
mysql增加远程访问权限
mysql> use mysql;
Database changed
mysql> select host,user from user where user="root";
+-----------+------+
| host | user |
+-----------+------+
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+-----------+------+
3 rows in set (0.02 sec)
mysql> Grant all on *.* to ‘root‘@‘10.3.0.4‘ identified by ‘root‘ with grant o
ption;Query OK, 0 rows affected (0.09 sec)
吧10.3.0.4替换成% 是所有IP允许登录
mysql> select host,user from user where user="root";
+-----------+------+
| host | user |
+-----------+------+
| 10.3.0.4 | root |
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+-----------+------+
4 rows in set (0.00 sec)
mysql增加远程访问权限
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。