RESET SLAVE
RESET SLAVE
makes the slave
forget its replication position in the master's binary logs.
This statement is meant to be used for a clean start: It deletes
the master.info
and
relay-log.info
files, all the relay logs,
and starts a new relay log.
All relay logs are deleted, even if they have not been
completely executed by the slave SQL thread. (This is a
condition likely to exist on a replication slave if you have
issued a STOP SLAVE
statement
or if the slave is highly loaded.)
Connection information stored in the
master.info
file is immediately reset using
any values specified in the corresponding startup options. This
information includes values such as master host, master port,
master user, and master password. If the slave SQL thread was in
the middle of replicating temporary tables when it was stopped,
and RESET SLAVE
is issued, these
replicated temporary tables are deleted on the slave.
User Comments
If you want to make a slave *completely* forget that it ever was a slave, then:
CHANGE MASTER TO MASTER_HOST=''
seems to do the trick.
If you run CHANGE MASTER TO MASTER_HOST='', you will not get any output from SHOW SLAVE STATUS. However, if you look in the filesystem you'll still see the master.info files, etc. If you then run RESET SLAVE, these files will be deleted.
Add your own comment.