DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(mysql.info.gz) START SLAVE

Info Catalog (mysql.info.gz) SHOW SLAVE STATUS (mysql.info.gz) Replication Slave SQL (mysql.info.gz) STOP SLAVE
 
 13.6.2.8 `START SLAVE' Syntax
 .............................
 
      START SLAVE [THREAD_TYPE [, THREAD_TYPE] ... ]
      START SLAVE [SQL_THREAD] UNTIL
          MASTER_LOG_FILE = 'LOG_NAME', MASTER_LOG_POS = LOG_POS
      START SLAVE [SQL_THREAD] UNTIL
          RELAY_LOG_FILE = 'LOG_NAME', RELAY_LOG_POS = LOG_POS
 
      thread_type: IO_THREAD | SQL_THREAD
 
 `START SLAVE' with no options starts both of the slave threads.  The
 I/O thread reads queries from the master server and stores them in the
 relay log.  The SQL thread reads the relay log and executes the queries.
 `START SLAVE' requires the `SUPER' privilege.
 
 If `START SLAVE' succeeds in starting the slave threads, it returns
 without any error. However, even in that case, it might be that the
 slave threads start and then later stop (for example, because they
 don't manage to connect to the master or read its binary logs, or some
 other problem). `START SLAVE' will not warn you about this. You must
 check your slave's error log for error messages generated by the slave
 threads, or check that they are running fine with `SHOW SLAVE STATUS'.
 
 As of MySQL 4.0.2, you can add `IO_THREAD' and `SQL_THREAD' options to
 the statement to name which of the threads to start.
 
 As of MySQL 4.1.1, an `UNTIL' clause may be added to specify that the
 slave should start and run until the SQL thread reaches a given point in
 the master binary logs or in the slave relay logs. When the SQL thread
 reaches that point, it stops.  If the `SQL_THREAD' option is specified
 in the statement, it starts only the SQL thread.  Otherwise, it starts
 both slave threads.  If the SQL thread is running, the `UNTIL' clause is
 ignored and a warning is issued.
 
 With an `UNTIL' clause, you must specify both a log filename and
 position. Do not mix master and relay log options.
 
 Any `UNTIL' condition is reset by a subsequent `STOP SLAVE' statement,
 a `START SLAVE' statement that includes no `UNTIL' clause, or a server
 restart.
 
 The `UNTIL' clause can be useful for debugging replication, or to cause
 replication to proceed until just before the point where you want to
 avoid having the slave replicate a statement. For example, if an unwise
 `DROP TABLE' statement was executed on the master, you can use `UNTIL'
 to tell the slave to execute up to that point but no farther.  To find
 what the event is, use `mysqlbinlog' with the master logs or slave
 relay logs, or by using a `SHOW BINLOG EVENTS' statement.
 
 If you are using `UNTIL' to have the slave process replicated queries in
 sections, it is recommended that you start the slave with the
 `--skip-slave-start' option to prevent the SQL thread from running when
 the slave server starts.  It is probably best to use this option in an
 option file rather than on the command line, so that an unexpected
 server restart does not cause it to be forgotten.
 
 The `SHOW SLAVE STATUS' statement includes output fields that display
 the current values of the `UNTIL' condition.
 
 This statement is called `SLAVE START' before MySQL 4.0.5.  For the
 moment, `SLAVE START' is still accepted for backward compatibility, but
 is deprecated.
 
Info Catalog (mysql.info.gz) SHOW SLAVE STATUS (mysql.info.gz) Replication Slave SQL (mysql.info.gz) STOP SLAVE
automatically generated byinfo2html