码迷,mamicode.com
首页 > 数据库 > 详细

mysql增加远程访问权限

时间:2016-09-21 16:08:43      阅读:147      评论:0      收藏:0      [点我收藏+]

标签: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增加远程访问权限

标签:mysql基本

原文地址:http://8561563.blog.51cto.com/8551563/1854901

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!