In this paper, mysql8.0.16 shots from copying and 8.0.17
yum install mysql-comminuty-server
grep 'password' /var/log/mysql.log // Screening temporary password
mysqladmin -p 'temporary password' password'new '
log-bin=mysql-bin
server-id=1
systemctl restart mysqld
create user 'repl'@'%' identified with navite_password by '密码';
grant replication salve on *.* to 'repl'@'%';
flush privileges;
show master status;
mysqldump -uroot -p password -all-databases --master-data = 1> /root/all.sql
scp -r /root/all.sql root @ IP address: / root
From:
yum install mysql-community-server
grep 'password' /var/log/mysql.log // Screening temporary password
mysqladmin -p 'temporary password' password'new '
we /etc/my.conf
service-id=2
mysql -h master node -p -u user password
show grants; // see Authorization
set sql_log_bin = 0 // avoid reducing the time to generate a large number of sql statement
source /root/all.sql;
change master to
master_host = 'addresses,
master_user = 'user',
master_password = 'password'
master_port = 'port'; // here because without the front master log_file
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=825
start slave;
show slave status\G;
stop slave;