mysql 开启外连及备份数据库
mysql 默认是禁止远程连接的,你在安装mysql的系统行运行mysql -u root -p 后进入mysql
输入如下:
输入如下:
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