Home  >  Article  >  Database  >  Mysql主主同步详细操作过程

Mysql主主同步详细操作过程

WBOY
WBOYOriginal
2016-06-07 16:48:19946browse

此处是在公司线上部署mysql双主时所记录的文档,为安全,IP都改为内网IP。版本信息:#mysql-VmysqlVer14.14Distrib5.5.37,fordebian-linux-gnu(x86_64)usingread

 

4

秒,缩短时间是为了防止双

            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: 107

              Relay_Log_Space: 556

              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: 2

1row in set (0.00 sec)

 

#IO线程与sql线程都是正常。

 

15、互为主从测试

在两台mysql各创建一个库,看两边是否都能进行同步。

分别在主库上执行 create database test01;

从库上执行create database test02;

看两台数据库上执行show databases;,看是否都有test01表和test02表。

我的经过测试,双主测试成功。

 

 


本文出自 “楊雲” 博客,请务必保留此出处

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn