输入如下:
mysql>use mysql;
mysql>grant all privileges on 数据库名字.* to '远程用户名'@'远程IP地址' identified by '远程用户的密码';
mysql>flush privileges;
mysql>\q
mysql>grant all privileges on 数据库名字.* to '远程用户名'@'远程IP地址' identified by '远程用户的密码';
mysql>flush privileges;
mysql>\q
/etc/mysql/my.cnf中去除bind-address = 127.0.0.1
备份:
mysqldump -uroot -pxxxxxxx database_name > storage.sql
参考文章:https://www.cnblogs.com/Cherie/p/3309456.html