##添加mysql用户:
CREATE USER 'admin'@'host' IDENTIFIED BY 'root';
##添加远程连接权限:
grant all on *.* to 'admin'@'%' identified by 'root' with grant option;
grant all on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges; 刷新权限
修改/etc/mysql/my.conf
找到bind-address = 127.0.0.1这一行
改为bind-address = 0.0.0.0即可