Please register login
Cross-border dating, Leading business, The sweet love story begins here return homepage

adminpersonal space https://admin.pclub.cc [favorite] [copy] [RSS]

log

MySQL Synchronization Installation Notes

hotness 100have read 134 times2022-8-27 20:19

ee /usr/local/etc/mysql/my.cnf

server-id=10
log-bin=mysql-bin
log-slave-updates
slave-skip-errors=1020,1022,1053,1060,1061,1169
slave_exec_mode=idempotent
replicate-same-server-id=0
auto_increment_increment=10
auto_increment_offset=1
innodb_flush_log_at_trx_commit=2
sync_binlog=1
slave_net_timeout=1
binlog-do-db=discuz
binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
binlog-ignore-db=sys
replicate-do-db=discuz
report-host=170.178.164.117

server-id=20
log-bin=mysql-bin
log-slave-updates
slave-skip-errors=1020,1022,1053,1060,1061,1169
slave_exec_mode=idempotent
replicate-same-server-id=0
auto_increment_increment=10
auto_increment_offset=2
innodb_flush_log_at_trx_commit=2
sync_binlog=1
slave_net_timeout=1
binlog-do-db=discuz
binlog-ignore-db=mysql
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
binlog-ignore-db=sys
replicate-do-db=discuz
report-host=45.58.190.117

change master to master_host='170.178.164.117', master_user='root', master_password='abcd1234', master_log_file='mysql-bin.000001', master_log_pos=51252;

change master to master_host='45.58.190.117', master_user='root', master_password='abcd1234', master_log_file='mysql-bin.000001', master_log_pos=51252;

mysql -u root -p
> alter user 'root'@'localhost' identified by 'root';
# 设置密码永不过期(本地)
alter user 'root'@'localhost' password expire never;
# 设置密码永不过期(远程)
alter user 'root'@'%' password expire never;
> flush privileges;
> quit

完整转冷储
mysqldump -u root -p --all-databases --triggers --routines --events > all.sql

部分转冷储
mysqldump -u root -p discuz --set-gtid-purged=OFF > discuz.sql

comment (0 comments)

Website statistics|Archiver|Mobile|Show darkroom|Playmate Club

GMT+8, 2023-1-28 07:22 , Processed in 0.032651 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

return to top