MySQL Replication

MySQL replication involves maintaining a separate server which is a continuous copy of a primary, master MySQL server. These statements and functions are related to those activities.

CHANGE MASTER TO

This MySQL statement changes the settings on a slave server related to the master server and replication.

LOAD DATA FROM MASTER

This MySQL statement has been deprecated and will be removed from future releases of MySQL.

LOAD TABLE...FROM MASTER

This MySQL statement has been deprecated and will be removed from future releases of MySQL since it has many problems.

MASTER_POS_WAIT( )

This function is useful to synchronize MySQL master and slave server logging.

PURGE MASTER LOGS

This MySQL statement deletes the binary logs from a master server.

RESET MASTER

This MySQL statement deletes all the binary log files on the master server.

RESET SLAVE

Use this MySQL statement within or after the RESET MASTER statement that sets the binary logging index back to 1.

SET GLOBAL SQL_SLAVE_SKIP_COUNTER

This MySQL statement skips the given number of events from the master.

This MySQL statement enables or disables binary logging of SQL statements for the current connection.

SHOW BINARY LOGS

This MySQL statement displays a list of binary logs created by the master MySQL server in the filesystem directory.

This MySQL statement displays the events in a binary log file.

SHOW MASTER LOGS

This MySQL statement displays a list of binary logs created by the master MySQL server in the filesystem directory.

SHOW MASTER STATUS

This MySQL statement displays information on the status of the binary log file that is being used currently on the master MySQL server.

SHOW SLAVE HOSTS

This MySQL statement displays a list of slave servers for the master server.

SHOW SLAVE STATUS

This MySQL statement displays information on the slave thread.

START SLAVE

Use this MySQL statement to start a slave server.

STOP SLAVE

This MySQL statement stops the slave server threads.