日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql主从同步从库上Slave_IO_Running: Connecting问题

發布時間:2024/9/20 数据库 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql主从同步从库上Slave_IO_Running: Connecting问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

mysql主從同步從庫上Slave_IO_Running: Connecting問題

一.在做主從同步時遇到的問題

?

數據庫主從問題從庫上Slave_IO_Running:?Connecting??

在做mysql主從同步的時候有時候發現在從庫上Slave_IO_Running:?Connecting

?

?

二.解決辦法通常是5個問題:

1.網絡不通??????#互ping機器ip,無丟包率正常訪問,排除

2.密碼不對??????#MySQL重新授權遠程用戶登陸賬號,重新設置密碼,排除

3.pos不正確?????#主服務器,登陸數據庫重新查看起始偏移量show master status,排除

4.ID問題????????

#ID的問題,在安裝完mysql數據庫的時候默認他們的server-id=1?但是在做主從同步的時候需要將ID號碼設置不一樣才行,查看數據庫配置文件cat ?/etc/my.cnf,文件寫的不同,排除

5.防火墻策略??

查看防火墻策略,是否放通雙方的服務端口?iptables -nL,最后發現 防火墻策略寫了多端口防火墻策略的端口不生效,解決防火墻策略單獨開放端口,暫停從服務的io讀取stop slave;重新在從的數據庫寫入以下語句:

mysql> change master to

????-> master_host='192.168.137.36', ????????????

????-> master_user='root', ????????????????

????-> master_password='abc123',

????-> master_port=3307,

????-> master_log_file='mysql-bin.000001',

????-> master_log_pos=848;

Query OK, 0 rows affected, 2 warnings (0.05 sec)

?

mysql> start slave;

Query OK, 0 rows affected (0.02 sec)

?

mysql> show slave status\G

*************************** 1. row ***************************

???????????????Slave_IO_State: Waiting for master to send event

??????????????????Master_Host: 192.168.137.36

??????????????????Master_User: root

??????????????????Master_Port: 3307

????????????????Connect_Retry: 60

??????????????Master_Log_File: mysql-bin.000001

??????????Read_Master_Log_Pos: 1298

???????????????Relay_Log_File: localhost-relay-bin.000002

????????????????Relay_Log_Pos: 770

????????Relay_Master_Log_File: mysql-bin.000001

?????????????Slave_IO_Running: Yes

????????????Slave_SQL_Running: Yes

??????????????Replicate_Do_DB:

??????????Replicate_Ignore_DB:

???????????Replicate_Do_Table:

???????Replicate_Ignore_Table:

??????Replicate_Wild_Do_Table:

??Replicate_Wild_Ignore_Table:

???????????????????Last_Errno: 0

???????????????????Last_Error:

?????????????????Skip_Counter: 0

??????????Exec_Master_Log_Pos: 1298

??????????????Relay_Log_Space: 981

??????????????Until_Condition: None

???????????????Until_Log_File:

????????????????Until_Log_Pos: 0

???????????Master_SSL_Allowed: No

???????????Master_SSL_CA_File:

???????????Master_SSL_CA_Path:

??????????????Master_SSL_Cert:

????????????Master_SSL_Cipher:

???????????????Master_SSL_Key:

????????Seconds_Behind_Master: 0

Master_SSL_Verify_Server_Cert: No

????????????????Last_IO_Errno: 0

????????????????Last_IO_Error:

???????????????Last_SQL_Errno: 0

???????????????Last_SQL_Error:

??Replicate_Ignore_Server_Ids:

?????????????Master_Server_Id: 9

??????????????????Master_UUID: ad899234-9c81-11e7-99bd-000c29af2bef

?????????????Master_Info_File: /data/mysql_data1/master.info

????????????????????SQL_Delay: 0

??????????SQL_Remaining_Delay: NULL

??????Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates

???????????Master_Retry_Count: 86400

??????????????????Master_Bind:

??????Last_IO_Error_Timestamp:

?????Last_SQL_Error_Timestamp:

???????????????Master_SSL_Crl:

???????????Master_SSL_Crlpath:

???????????Retrieved_Gtid_Set:

????????????Executed_Gtid_Set:

????????????????Auto_Position: 0

?????????Replicate_Rewrite_DB:

?????????????????Channel_Name:

???????????Master_TLS_Version:

1 row in set (0.00 sec)

注意:標注的倆個紅色yes為正常。

?

本文原作者去輕狂書生,原文鏈接http://blog.51cto.com/8999a/1966548

標簽:?IO?Running?Slave

聲明:本文內容由互聯網用戶自發貢獻自行上傳,本網站不擁有所有權,未作人工編輯處理,也不承擔相關法律責任。如果您發現有涉嫌版權的內容,歡迎發送郵件至:4051308@qq.com 進行舉報,并提供相關證據,工作人員會在5個工作日內聯系你,一經查實,本站將立刻刪除涉嫌侵權內容。

來源:https://cloud.tencent.com/info/3ce6fb6c2d65bd337b37e591b46a3557.html

總結

以上是生活随笔為你收集整理的mysql主从同步从库上Slave_IO_Running: Connecting问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。