Press "Enter" to skip to content

mysql 关闭slave

mysql版本:5.6.14

一、修改 my.cnf 文件,增加skip-slave-start参数即可

[mysqld]

#主从
log-bin=mysql-bin  
server-id=148

skip-slave-start

二、重启mysql

/etc/init.d/mysql restart

三、验证slave是否启动

mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
               Slave_IO_State: 
                  Master_Host: 10.1.40.248
                  Master_User: mysync
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000010
          Read_Master_Log_Pos: 943
               Relay_Log_File: localhost-relay-bin.000006
                Relay_Log_Pos: 376
        Relay_Master_Log_File: mysql-bin.000010
             Slave_IO_Running: No
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 

注:本文转自https://blog.csdn.net/u010969226/article/details/44198371

Be First to Comment

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注