跳到主要内容

1 篇博文 含有标签「mysql」

查看所有标签

· 阅读需 1 分钟

mysql开启远程访问(如navicat)需要修改两处地方:

  1. mysql授权某用户可以远程连接到哪些库:
grant all privileges on *.* to root@'%' identified by 'mypassword' with grant option;
flush privileges;

其中,all privileges表示所有权限,. 表示所有表,root@'%'表示root用户来自任何来源。

  1. mysql 服务允许远程连接,找到my.cnf,注释其中的bind-address = 127.0.0.1即可。ubuntu上在/etc/mysql/my.cnf。

p.s. mysql版本5.6