MySQL 5.6.19主從server-id不生效,The server is not configured as slave

來源:互聯網
上載者:User

標籤:mysql   主從複製   

ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO

首先 確認您的再slave伺服器上執行了如下,來配置slave伺服器。

change master to master_host=‘master_host‘, master_user=‘you_user_name‘, master_password=‘you_master_user_password‘,master_log_file=‘mysqld-bin.000001‘, master_log_pos=98;


(master_log_file和master_log_pos)是你可以在伺服器上運行 show master status; 來得到。


接下來確認slave和master的上的server_id是否正確。可以分別在slave和master上運行 SHOW VARIABLES LIKE ‘server_id‘; 來查看server_id是否和你配置的一樣。


不一樣修改設定檔。在從伺服器上編輯/etc/my.conf,在[mysqld]最下方添加server_id=x ,x值與主伺服器server_id相同,重啟伺服器,即可。


本文出自 “godben” 部落格,請務必保留此出處http://godben.blog.51cto.com/8919725/1711172

MySQL 5.6.19主從server-id不生效,The server is not configured as slave

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.