change master用法
重启master库:service mysqld restart
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 98 | | |
+------------------+----------+--------------+------------------+
mysql> slave stop;
mysql> change master to Master_Log_File='mysql-bin.000001',Master_Log_Pos=98;
mysql> slave start;
mysql> show slave status/G
master_def:
MASTER_HOST = 'host_name '
| MASTER_USER = 'user_name '
| MASTER_PASSWORD = 'password '
| MASTER_PORT =port_num
| MASTER_CONNECT_RETRY =count
| MASTER_LOG_FILE = 'master_log_name '
| MASTER_LOG_POS =master_log_pos
| RELAY_LOG_FILE = 'relay_log_name '
| RELAY_LOG_POS =relay_log_pos
| MASTER_SSL = {0|1}
| MASTER_SSL_CA = 'ca_file_name '
| MASTER_SSL_CAPATH = 'ca_directory_name '
| MASTER_SSL_CERT = 'cert_file_name '
| MASTER_SSL_KEY = 'key_file_name '
| MASTER_SSL_CIPHER = 'cipher_list '