允许用户远程登录
- 创建用户
create user 'root'@'%' identified by '***';
grant all on *.* to 'root'@'%';
- 修改
/etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
- 重启服务
service mysql restart
允许用户远程登录
create user 'root'@'%' identified by '***';
grant all on *.* to 'root'@'%';
/etc/mysql/mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
service mysql restart