MariaDB基于GTID的復(fù)制-創(chuàng)新互聯(lián)

1、配置主從節(jié)點的服務(wù)配置文件

成都創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站建設(shè)、成都做網(wǎng)站、余杭網(wǎng)絡(luò)推廣、重慶小程序開發(fā)、余杭網(wǎng)絡(luò)營銷、余杭企業(yè)策劃、余杭品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們大的嘉獎;成都創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供余杭建站搭建服務(wù),24小時服務(wù)熱線:18980820575,官方網(wǎng)址:muchs.cn

1.1、配置master節(jié)點:

#binlog_format=mixed

binlog-format=ROW

# required unique id between 1 and 2^32 - 1

# defaults to 1 if master-host is not set

# but will not function as a master if omitted

server-id    = 1

log-slave-updates=true

master-info-repository=TABLE

relay-log-info-repository=TABLE

sync-master-info=1

slave-parallel-threads=2

binlog-checksum=CRC32

master-verify-checksum=1

slave-sql-verify-checksum=1

binlog-rows-query-log_events=1

report-port=3306

report-host=www.pancou.com

1.2、配置slave節(jié)點:

[mysqld]

#binlog_format=mixed

binlog-format=ROW

# required unique id between 1 and 2^32 - 1

# defaults to 1 if master-host is not set

# but will not function as a master if omitted

server-id    = 2

log-slave-updates=true

master-info-repository=TABLE

relay-log-info-repository=TABLE

sync-master-info=1

slave-parallel-threads=2

binlog-checksum=CRC32

master-verify-checksum=1

slave-sql-verify-checksum=1

binlog-rows-query-log_events=1

report-port=3306

report-host=www.pancou.com

MariaDB [(none)]> change master to master_host='192.168.110.128',master_port=3306,master_user='repl_user',master_password='pancou',master_use_gtid=current_pos;

Query OK, 0 rows affected (0.06 sec)

MariaDB [(none)]> start slave;

Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> change master to master_host='192.168.110.130',master_port=3306,master_host='repl_user',master_password='pancou',master_use_gtid=current_pos;

Query OK, 0 rows affected (0.03 sec)

MariaDB [(none)]> start slave;

Query OK, 0 rows affected (0.02 sec)

MariaDB [(none)]> show slave status\G

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

        Slave_IO_State: Connecting to master

         Master_Host: repl_user

         Master_User: repl_user

         Master_Port: 3306

        Connect_Retry: 60

       Master_Log_File:

     Read_Master_Log_Pos: 4

        Relay_Log_File: www-relay-bin.000001

        Relay_Log_Pos: 4

    Relay_Master_Log_File:

       Slave_IO_Running: Connecting

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

       Relay_Log_Space: 248

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

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

        Master_SSL_Crl:

      Master_SSL_Crlpath:

          Using_Gtid: Current_Pos

         Gtid_IO_Pos: 0-2-645

1 row in set (0.00 sec)

MariaDB [(none)]> show variables like 'slave_parallel%';

+---------------------------+--------+

| Variable_name       | Value  |

+---------------------------+--------+

| slave_parallel_max_queued | 131072 |

| slave_parallel_threads   | 2    |

+---------------------------+--------+

2 rows in set (0.01 sec)

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

新聞標(biāo)題:MariaDB基于GTID的復(fù)制-創(chuàng)新互聯(lián)
當(dāng)前網(wǎng)址:http://muchs.cn/article32/deggsc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)頁設(shè)計公司微信公眾號、標(biāo)簽優(yōu)化、品牌網(wǎng)站制作App開發(fā)、ChatGPT

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站