ubuntu mysql允许远程连接
MySQL允许远程访问的设置
1.注释bind-address = 127.0.0.1。
代码如下:
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1注释掉
2.、支持root用户允许远程连接mysql数据库
grant all privileges on . to 'root'@'%' identified by '123456' with grant option;
flush privileges;
然后重启mysql