好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

MYSQL添加远程用户或允许远程访问

使用 root 用户登录: 

使用 grant 语句:

1、添加一个用户admin并授权通过本地机(localhost)访问,密码"something"

mysql>grant all privileges on *.* to admin@localhost identified by ‘something‘ with grant option;

2、添加一个用户admin并授权可从任何其它主机发起的访问(通配符%)

mysql>grant all privileges on *.* to admin@"%" identified by ‘something‘ with grant option;

3、刷新权限列表

mysql>flush privileges;

MYSQL添加远程用户或允许远程访问

标签:

查看更多关于MYSQL添加远程用户或允许远程访问的详细内容...

  阅读:28次