stop slave; mysql> reset slave all;" command."/> stop slave; mysql> reset slave all;" command.">

Home >Database >Mysql Tutorial >How to delete slave in mysql

How to delete slave in mysql

藏色散人
藏色散人Original
2021-12-28 10:34:383038browse

Mysql method to delete slave information: 1. Open the command window; 2. Execute the "mysql> stop slave; mysql> reset slave all;" command.

How to delete slave in mysql

The operating environment of this article: Windows 7 system, mysql version 5.5, Dell G3 computer.

How to delete slave in mysql?

MySQL completely clears slave information:

In our MySQL, Master and Slave During the master-slave switch, the slave is successfully upgraded to the master database. At this time, the slave database information needs to be completely cleared. Otherwise, the monitoring system will think that the server is a slave and will report a master-slave synchronization failure.

In fact, it is very simple. It only requires the following two steps:

mysql> stop slave;
mysql> reset slave all;

reset slave all; is to clear the synchronous replication information of the slave library, including connection information and binary file name and location.

After executing this command from the library, there will be no output using show slave status.

Recommended learning: "mysql video tutorial"

The above is the detailed content of How to delete slave in mysql. For more information, please follow other related articles on the PHP Chinese website!

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