mysql server uuids_master and slave have equal MySQL server UUIDs 解决方法
使用rsync配置了大量mysql,省去了大量編譯和配置的時間,隨逐個修改master和slave服務器的my.cnf,后,發現數據不能同步,
在slave服務器show slave status:
Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work.
首先檢查:
mysql> show variables like ‘server_id';
+—————+——-+
| Variable_name | Value |
+—————+——-+
| server_id | 3 |
+—————+——-+
主從并不一樣,排除該問題。
繼續排查,找到原因在于,拷貝整個data目錄,把auto.cnf文件也拷貝過來了,里面記錄了數據庫的uuid,每個庫的uuid應該是不一樣的。
[auto]
server-uuid=6dcee5be-8cdb-11e2-9408-90e2ba2e2ea6
解決辦法,按照這個16進制格式,隨便改下,重啟mysql即可。
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的mysql server uuids_master and slave have equal MySQL server UUIDs 解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。