时间:2021-07-01 10:21:17 帮助过:21人阅读
5.登录从数据库
1.reset slave;
2.change master to master_host=‘192.168.176.3‘,master_port=3306,master_user=‘test‘,master_password=‘123456‘,master_log_file=‘mysql-bin.000003‘,master_log_pos=120;
,master_log_file与master_log_pos 在主数据库 show master status;中查看
3.start slave;
笔记,不同数据库复制库表 :mysqldump testdata -uroot -proot --add-drop-table | mysql -h 192.168.176.4 testdata -u root -proot
前提,1.目标数据库建好库 CREATE DATABASE `wordpress` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
2.授权远程连接GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";
mysql重启 service mysqld restart 配置文件 :/etc/my.cnf
mysql 主从配置笔记
标签:bin char drop default log-bin csharp -- serve color