Skip to content

Instantly share code, notes, and snippets.

@matsumana
Created October 19, 2012 18:02
Show Gist options
  • Save matsumana/3919666 to your computer and use it in GitHub Desktop.
Save matsumana/3919666 to your computer and use it in GitHub Desktop.
MySQL5.6レプリケーションを試す
Failover starting in 'auto' mode...
# Checking eligibility of slave debian01:3306 for candidate.
# GTID_MODE=ON ... Ok
# Replication user exists ... Ok
# Candidate slave debian01:3306 will become the new master.
# Preparing candidate for failover.
# LOCK STRING: FLUSH TABLES WITH READ LOCK
# Connecting candidate to debian02:3306 as a master to retrieve unprocessed GTIDs.
# Change master command for debian01:3306
# CHANGE MASTER TO MASTER_HOST = 'debian02', MASTER_USER = 'repl', MASTER_PASSWORD = '3306', MASTER_PORT = 3306, MASTER_AUTO_POSITION=1
# UNLOCK STRING: UNLOCK TABLES
# Waiting for candidate to catch up to slave debian02:3306.
# Slave debian01:3306:
# QUERY = SELECT SQL_THREAD_WAIT_AFTER_GTIDS('E28E1B3C-A1F6-482D-B255-1DA41B72A696:1-90', 3)
# Return Code = -1
# Slave debian01:3306:
# QUERY = SELECT SQL_THREAD_WAIT_AFTER_GTIDS('F50AAD27-18FA-11E2-A06B-000C299AE524:1-9', 3)
# Return Code = -1
# Creating replication user if it does not exist.
# Stopping slaves.
# Performing STOP on all slaves.
# Executing stop on slave debian01:3306 Ok
# Executing stop on slave debian02:3306 Ok
# Switching slaves to new master.
# Change master command for debian01:3306
# CHANGE MASTER TO MASTER_HOST = 'debian01', MASTER_USER = 'repl', MASTER_PASSWORD = '3306', MASTER_PORT = 3306, MASTER_AUTO_POSITION=1
# Change master command for debian02:3306
# CHANGE MASTER TO MASTER_HOST = 'debian01', MASTER_USER = 'repl', MASTER_PASSWORD = '3306', MASTER_PORT = 3306, MASTER_AUTO_POSITION=1
# Starting slaves.
# Performing START on all slaves.
# Executing start on slave debian02:3306 Ok
# Checking slaves for errors.
# debian02:3306 status: Ok
# Failover complete.
Failover console will restart in 5 seconds.
# Attempting to contact debian01 ... Success
# Filter Check Failed.
+---------+----------+----------------------------------------------+
| role | *_do_db | *_ignore_db |
+---------+----------+----------------------------------------------+
| MASTER | | |
| slave | | information_schema,performance_schema,mysql |
+---------+----------+----------------------------------------------+
# Attempting to contact debian02 ... Success
Replication Health Status
+-----------+-------+---------+--------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+-------------+-------------+--------------+------------------+---------------+-------------------------------------------------------------------------------+----------------+------------+---------------+
| host | port | role | state | gtid_mode | health | version | master_log_file | master_log_pos | IO_Thread | SQL_Thread | Secs_Behind | Remaining_Delay | IO_Error_Num | IO_Error | SQL_Error_Num | SQL_Error | Trans_Behind |
+-----------+-------+---------+--------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+-------------+-------------+--------------+------------------+---------------+-------------------------------------------------------------------------------+----------------+------------+---------------+
| debian01 | 3306 | MASTER | UP | ON | OK | 5.6.7-rc-log | mysql-bin.000003 | 379 | | | | | | | | | |
| debian02 | 3306 | SLAVE | UP | ON | IO thread is not running., error connecting to master 'repl@debian01:3306' - retry-time: 60 retries: 1, Slave has 1 transactions behind master. | 5.6.7-rc-log | | 4 | Connecting | Yes | 0 | No | 1045 | error connecting to master 'repl@debian01:3306' - retry-time: 60 retries: 1 | 0 | | 1 |
+-----------+-------+---------+--------+------------+---------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------------+-----------------+-------------+-------------+--------------+------------------+---------------+-------------------------------------------------------------------------------+----------------+------------+---------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment