mysql5.7原始碼 centos7.5
從庫的IO執行緒不能是yes狀態
Last_IO_Errno: 0
Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error:
主庫master關閉防火墻 和關閉SELinux
主庫用戶repluser只給一個同步命令權限
mysql> grant replication slave on *.* to repluser@"%" identified by "123qqq...A";
vi /etc/my.cnf
server-id = 51
log_bin = /data/mysql5.7/master51
mysql> show master status;
+-----------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+-----------------+----------+--------------+------------------+-------------------+
| master51.000004 | 154 | | | |
+-----------------+----------+--------------+------------------+-------------------+
從庫slave關閉防火墻 和關閉SELinux
vi /etc/my.cnf
server-id = 52
mysql>change master to master_host="192.168.41.51",master_user="repluser" ,master_password="123qqq...A" ,master_log_file="master51.000004",master_log_pos=154 ;
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status\G;
Last_IO_Errno: 0
Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error:
主庫的授權用戶是只有同步權限,主從的網路是通的,主庫使用授權用戶可以登錄資料庫,
在從庫沒有啟動start slave ;
mysql> show slave status\G;
Slave_IO_Running: No
Slave_SQL_Running: No
Last_IO_Errno: 0
Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error:
看狀態就有這個錯誤,啟動的時候都沒有錯誤出現,這個問題有怎樣的解決辦法
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/251220.html
標籤:MySQL
