中文字幕第五页-中文字幕第页-中文字幕韩国-中文字幕最新-国产尤物二区三区在线观看-国产尤物福利视频一区二区

mysql5.6升級到5.7.13后開啟多源復制遇到重復的channelname該怎么辦

這篇文章將為大家詳細講解有關MySQL5.6升級到5.7.13后開啟多源復制遇到重復的channel name該怎么辦,文章內容質量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。

成都創新互聯堅持“要么做到,要么別承諾”的工作理念,服務領域包括:成都網站設計、網站建設、企業官網、英文網站、手機端網站、網站推廣等服務,滿足客戶于互聯網時代的珙縣網站設計、移動媒體設計的需求,幫助企業找到有效的互聯網解決方案。努力成為您成熟可靠的網絡建設合作伙伴!

點擊(此處)折疊或打開

  1. 一共三個數據庫,原版本均為5.6,升級到5.7.13后開啟多源復制,做成兩主一從,發現channel name同名。

  2. 在從庫執行reset slave all后,從庫自動重啟。

  3. 5.6 ---> 5.7.13:

  4. 5.6:

  5. 1 cd /usr/local/mysql ; scripts/mysql_install_db --user=mysql --defaults-file=/57data/my56.cnf

  6. 2 /usr/local/mysql/bin/mysqld_safe --defaults-file=/57data/my56.cnf &

  7. 3 mysqladmin -S /tmp/mysql3307.sock -u root -P3307 -p password

  8. 4 mysql -uroot -S /tmp/mysql3307.sock -pmysql

  9. 5 set global innodb_fast_shutdown=0;

  10. 6 mysqladmin -S /tmp/mysql3307.sock  shutdown

  11. 5.7:

  12. 7 cd /usr/local/mysql57 ; ./bin/mysqld_safe --defaults-file=/57data/my.cnf &

  13. 8 cd /usr/local/mysql57 ; ./bin/mysql_upgrade -S /tmp/mysql3307.sock

  14. 9 cd /usr/local/mysql57 ; ./bin/mysqladmin -S /tmp/mysql3307.sock shutdown

  15. 10 cd /usr/local/mysql57 ; ./bin/mysqld_safe --defaults-file=/57data/my.cnf &

  16. 11 /usr/local/mysql57/bin/mysql -S /tmp/mysql3307.sock

  17. 12 grant replication slave,replication client on *.* to repl@'%' identified by 'passw0rd';

  18. 13

  19. mysql> SET GLOBAL master_info_repository = 'TABLE';

  20. Query OK, 0 rows affected (0.00 sec)

  21. mysql> SET GLOBAL relay_log_info_repository = 'TABLE';

  22. Query OK, 0 rows affected (0.00 sec)

  23. mysql>

  24. mysql> change master to master_host='vm2',

  25.     -> master_user='repl',

  26.     -> MASTER_PORT=3307,

  27.     -> master_password='passw0rd',

  28.     -> master_auto_position=1 FOR CHANNEL 'master_vm2';

  29. change master to master_host='vm3',

  30. master_user='repl',

  31. MASTER_PORT=3307,

  32. master_password='passw0rd',

  33. Query OK, 0 rows affected, 2 warnings (0.08 sec)

  34. mysql>

  35. mysql> change master to master_host='vm3',

  36.     -> master_user='repl',

  37.     -> MASTER_PORT=3307,

  38.     -> master_password='passw0rd',

  39.     -> master_auto_position=1 FOR CHANNEL 'master_vm3';

  40. Query OK, 0 rows affected, 2 warnings (0.04 sec)

  41. mysql>

  42. mysql>

  43. mysql> show slave status\G;

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

  45.                Slave_IO_State:

  46.                   Master_Host: vm2

  47.                   Master_User: repl

  48.                   Master_Port: 3307

  49.                 Connect_Retry: 60

  50.               Master_Log_File:

  51.           Read_Master_Log_Pos: 4

  52.                Relay_Log_File: vm4-relay-bin-master_vm2.000001

  53.                 Relay_Log_Pos: 4

  54.         Relay_Master_Log_File:

  55.              Slave_IO_Running: No

  56.             Slave_SQL_Running: No

  57.               Replicate_Do_DB:

  58.           Replicate_Ignore_DB:

  59.            Replicate_Do_Table:

  60.        Replicate_Ignore_Table:

  61.       Replicate_Wild_Do_Table:

  62.   Replicate_Wild_Ignore_Table:

  63.                    Last_Errno: 0

  64.                    Last_Error:

  65.                  Skip_Counter: 0

  66.           Exec_Master_Log_Pos: 0

  67.               Relay_Log_Space: 154

  68.               Until_Condition: None

  69.                Until_Log_File:

  70.                 Until_Log_Pos: 0

  71.            Master_SSL_Allowed: No

  72.            Master_SSL_CA_File:

  73.            Master_SSL_CA_Path:

  74.               Master_SSL_Cert:

  75.             Master_SSL_Cipher:

  76.                Master_SSL_Key:

  77.         Seconds_Behind_Master: NULL

  78. Master_SSL_Verify_Server_Cert: No

  79.                 Last_IO_Errno: 0

  80.                 Last_IO_Error:

  81.                Last_SQL_Errno: 0

  82.                Last_SQL_Error:

  83.   Replicate_Ignore_Server_Ids:

  84.              Master_Server_Id: 0

  85.                   Master_UUID:

  86.              Master_Info_File: mysql.slave_master_info

  87.                     SQL_Delay: 0

  88.           SQL_Remaining_Delay: NULL

  89.       Slave_SQL_Running_State:

  90.            Master_Retry_Count: 86400

  91.                   Master_Bind:

  92.       Last_IO_Error_Timestamp:

  93.      Last_SQL_Error_Timestamp:

  94.                Master_SSL_Crl:

  95.            Master_SSL_Crlpath:

  96.            Retrieved_Gtid_Set:

  97.             Executed_Gtid_Set: 45ee9543-2d51-11e6-ba5d-0800276e6667:1-2,

  98. 4acf2a8c-2d51-11e6-ba5d-080027806975:1-2,

  99. 4c01fc54-2d51-11e6-ba5d-08002781f86e:1-6

  100.                 Auto_Position: 1

  101.          Replicate_Rewrite_DB:

  102.                  Channel_Name: master_vm2

  103.            Master_TLS_Version:

  104. *************************** 2. row ***************************

  105.                Slave_IO_State:

  106.                   Master_Host: vm3

  107.                   Master_User: repl

  108.                   Master_Port: 3307

  109.                 Connect_Retry: 60

  110.               Master_Log_File:

  111.           Read_Master_Log_Pos: 4

  112.                Relay_Log_File: vm4-relay-bin-master_vm3.000001

  113.                 Relay_Log_Pos: 4

  114.         Relay_Master_Log_File:

  115.              Slave_IO_Running: No

  116.             Slave_SQL_Running: No

  117.               Replicate_Do_DB:

  118.           Replicate_Ignore_DB:

  119.            Replicate_Do_Table:

  120.        Replicate_Ignore_Table:

  121.       Replicate_Wild_Do_Table:

  122.   Replicate_Wild_Ignore_Table:

  123.                    Last_Errno: 0

  124.                    Last_Error:

  125.                  Skip_Counter: 0

  126.           Exec_Master_Log_Pos: 0

  127.               Relay_Log_Space: 154

  128.               Until_Condition: None

  129.                Until_Log_File:

  130.                 Until_Log_Pos: 0

  131.            Master_SSL_Allowed: No

  132.            Master_SSL_CA_File:

  133.            Master_SSL_CA_Path:

  134.               Master_SSL_Cert:

  135.             Master_SSL_Cipher:

  136.                Master_SSL_Key:

  137.         Seconds_Behind_Master: NULL

  138. Master_SSL_Verify_Server_Cert: No

  139.                 Last_IO_Errno: 0

  140.                 Last_IO_Error:

  141.                Last_SQL_Errno: 0

  142.                Last_SQL_Error:

  143.   Replicate_Ignore_Server_Ids:

  144.              Master_Server_Id: 0

  145.                   Master_UUID:

  146.              Master_Info_File: mysql.slave_master_info

  147.                     SQL_Delay: 0

  148.           SQL_Remaining_Delay: NULL

  149.       Slave_SQL_Running_State:

  150.            Master_Retry_Count: 86400

  151.                   Master_Bind:

  152.       Last_IO_Error_Timestamp:

  153.      Last_SQL_Error_Timestamp:

  154.                Master_SSL_Crl:

  155.            Master_SSL_Crlpath:

  156.            Retrieved_Gtid_Set:

  157.             Executed_Gtid_Set: 45ee9543-2d51-11e6-ba5d-0800276e6667:1-2,

  158. 4acf2a8c-2d51-11e6-ba5d-080027806975:1-2,

  159. 4c01fc54-2d51-11e6-ba5d-08002781f86e:1-6

  160.                 Auto_Position: 1

  161.          Replicate_Rewrite_DB:

  162.                  Channel_Name: master_vm2

  163.            Master_TLS_Version:

  164. 2 rows in set (0.00 sec)

  165. ERROR:

  166. No query specified

  167. mysql>

  168. mysql> select CHANNEL_NAME FROM performance_schema.replication_connection_status;

  169. +--------------+

  170. | CHANNEL_NAME |

  171. +--------------+

  172. | master_vm2 |

  173. | master_vm2 |

  174. +--------------+

  175. 2 rows in set (0.01 sec)

  176. mysql> select CHANNEL_NAME FROM performance_schema.replication_connection_status;

  177. +--------------+

  178. | CHANNEL_NAME |

  179. +--------------+

  180. | master_vm2 |

  181. | master_vm2 |

  182. +--------------+

  183. 2 rows in set (0.01 sec)

  184. mysql> start slave;

  185. Query OK, 0 rows affected (0.04 sec)

  186. 在兩主庫分別建數據庫vm2和vm3,系統正常復制到從庫。

  187. mysql> show databases;

  188. +--------------------+

  189. | Database |

  190. +--------------------+

  191. | information_schema |

  192. | mysql |

  193. | performance_schema |

  194. | sys |

  195. | test |

  196. | vm2 |

  197. | vm3 |

  198. +--------------------+

  199. 7 rows in set (0.00 sec)

  200. 在從庫執行reset slave all,從庫自動重啟。

  201. mysql> reset slave all;

  202. ERROR 2013 (HY000): Lost connection to MySQL server during query

  203. mysql> 2016-06-08T08:56:18.890685Z mysqld_safe Number of processes running now: 0

  204. 2016-06-08T08:56:18.906614Z mysqld_safe mysqld restarted

  205. mysql>

  206. mysql> reset slave all;

  207. ERROR 2006 (HY000): MySQL server has gone away

  208. No connection. Trying to reconnect...

  209. Connection id: 2

  210. Current database: *** NONE ***

  211. Query OK, 0 rows affected (0.09 sec)

  212. mysql> show slave status\G;

  213. Empty set (0.01 sec)

  214. ERROR:

  215. No query specified

  216. err log里channel name信息顯示正確,但出現Thread pointer相關信息,如下:

  217. 2016-06-08T08:55:54.540373Z 4 [Note] Error reading relay log event for channel 'master_vm2': slave SQL thread was killed

  218. 2016-06-08T08:55:54.550729Z 3 [Note] Slave I/O thread killed while reading event for channel 'master_vm2'

  219. 2016-06-08T08:55:54.550814Z 3 [Note] Slave I/O thread exiting for channel 'master_vm2', read up to log 'mysql_bin.000005', position 653

  220. 2016-06-08T08:55:54.556301Z 6 [Note] Error reading relay log event for channel 'master_vm3': slave SQL thread was killed

  221. 2016-06-08T08:55:54.563404Z 5 [Note] Slave I/O thread killed while reading event for channel 'master_vm3'

  222. 2016-06-08T08:55:54.563549Z 5 [Note] Slave I/O thread exiting for channel 'master_vm3', read up to log 'mysql_bin.000005', position 653

  223. 08:56:18 UTC - mysqld got signal 11 ;

  224. This could be because you hit a bug. It is also possible that this binary

  225. or one of the libraries it was linked against is corrupt, improperly built,

  226. or misconfigured. This error can also be caused by malfunctioning hardware.

  227. Attempting to collect some information that could help diagnose the problem.

  228. As this is a crash and something is definitely wrong, the information

  229. collection process might fail.

  230. key_buffer_size=8388608

  231. read_buffer_size=131072

  232. max_used_connections=1

  233. max_threads=151

  234. thread_count=1

  235. connection_count=1

  236. It is possible that mysqld could use up to

  237. key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68189 K  bytes of memory

  238. Hope that's ok; if not, decrease some variables in the equation.

    Thread pointer: 0x7f9550000b10
    Attempting backtrace. You can use the following information to find out
    where mysqld died. If you see no messages after this, something went
    terribly wrong...
    stack_bottom = 7f9583175e28 thread_stack 0x40000
    /usr/local/mysql57/bin/mysqld(my_print_stacktrace+0x35)[0xf25c45]
    /usr/local/mysql57/bin/mysqld(handle_fatal_signal+0x4a4)[0x7b8604]
    /lib64/libpthread.so.0[0x37f160f7e0]
    /usr/local/mysql57/bin/mysqld(_ZN16Multisource_info9delete_miEPKc+0x2df)[0xf082ff]
    /usr/local/mysql57/bin/mysqld(_Z11reset_slaveP3THDP11Master_infob+0x1c5)[0xef1e05]
    /usr/local/mysql57/bin/mysqld(_Z11reset_slaveP3THD+0x2e2)[0xef21b2]
    /usr/local/mysql57/bin/mysqld(_Z15reset_slave_cmdP3THD+0x98)[0xef2388]
    /usr/local/mysql57/bin/mysqld(_Z20reload_acl_and_cacheP3THDmP10TABLE_LISTPi+0x30c)[0xd2ae3c]
    /usr/local/mysql57/bin/mysqld(_Z21mysql_execute_commandP3THDb+0x83a)[0xcfaf2a]
    /usr/local/mysql57/bin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x3cd)[0xcff97d]
    /usr/local/mysql57/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x1099)[0xd00a79]
    /usr/local/mysql57/bin/mysqld(_Z10do_commandP3THD+0x194)[0xd016e4]
    /usr/local/mysql57/bin/mysqld(handle_connection+0x2a4)[0xdce6e4]
    /usr/local/mysql57/bin/mysqld(pfs_spawn_thread+0x171)[0x121b951]
    /lib64/libpthread.so.0[0x37f1607aa1]
    /lib64/libc.so.6(clone+0x6d)[0x37f0ee893d]

    Trying to get some variables.
    Some pointers may be invalid and cause the dump to abort.
    Query (7f95500054f0): is an invalid pointer
    Connection ID (thread ID): 2
    Status: NOT_KILLED

    The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
    information that should help you find out what is causing the crash.
    2016-06-08T08:56:18.890685Z mysqld_safe Number of processes running now: 0
    2016-06-08T08:56:18.906614Z mysqld_safe mysqld restarted

關于mysql5.6升級到5.7.13后開啟多源復制遇到重復的channel name該怎么辦就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

當前題目:mysql5.6升級到5.7.13后開啟多源復制遇到重復的channelname該怎么辦
網頁URL:http://www.2m8n56k.cn/article36/iidcpg.html

成都網站建設公司_創新互聯,為您提供外貿建站企業網站制作搜索引擎優化品牌網站設計網站改版網站設計

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:[email protected]。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

h5響應式網站建設
主站蜘蛛池模板: 99视频国产热精品视频 | 3级黄色 | 久久免费在线观看 | 美女视频免费黄色 | 日本欧美韩国一区二区三区 | 日本黄网在线观看 | 九九热视频精品 | 国产一国产一级毛片视频在线 | 欧美日韩大片 | 国产在线观看精品一区二区三区91 | 一级毛片观看 | 狠狠色综合久久丁香婷婷 | 亚洲美女视频 | 麻豆日韩 | 亚洲午夜影视 | 99久热在线精品视频播放6 | www日本com| 新版天堂中文资源官网 | 日韩一级欧美一级毛片在线 | 欧美成人性生活视频 | 精品三级内地国产在线观看 | 欧美另类性视频在线看 | 国产日韩精品欧美一区视频 | 亚洲深夜福利视频 | 国产v欧美v日韩在线观看 | 国产一级做a爰片在线看 | 国产高清在线精品一区二区三区 | 蜜桃日本一道无卡不码高清 | 国产成人18黄网站在线观看网站 | 欧美日韩精品一区二区三区不卡 | 一级黑人| 欧美人在线一区二区三区 | 亚洲国产成人在线观看 | 日本www视频在线观看 | 日韩女人做爰大片 | 国产a自拍| 手机看片国产欧美日韩高清 | 一级黄网站| 欧美精品一二区 | 久草综合在线视频 | 国内外成人免费在线视频 |