MySQL Forums
Forum List  »  Replication

MySQL Replication Tools - Event Not Found
Posted by: Arthur Quenneville
Date: March 24, 2015 08:44AM

Our clients at our department are looking for a High-Availability solution. We decided to implement MySQL Replication and to use mysqlfailover as the high-availability tool.

Replication is performing properly and I can see the transactions are being applied to the slave server from the master.

However, when we try to run the mysqlfailover tool, or any other tool such as mysqlrplcheck we receive the message: "-bash: !@mysqlserver2: event not found'

Commands:
mysqlrplcheck --master=root:*****@mysqlserver1:3306 --slave=root:******@mysqlserver2:3306
-bash: !@mysqlserver2: event not found
mysqlfailover --master=root:******@mysqlserver1:3306 --slaves=root:******@mysqlserver2:3306 --failover-mode=auto --log=/PROJ/Logs/replication.log --verbose
-bash: !@mysqlserver2: event not found

In MySQL we can see that Replication is working:

Master:
mysql> show master status;
+------------------+----------+--------------+------------------+------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+------------------------------------------+
| mysql-bin.000003 | 480 | | | c6cf8875-53b9-11e4-aa27-005056972d66:1-2 |
+------------------+----------+--------------+------------------+------------------------------------------+
1 row in set (0.00 sec)

Slave:
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: msqlbdbstag2.statcan.ca
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 480
Relay_Log_File: mysql-relay-bin.000002
Relay_Log_Pos: 480
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 480
Relay_Log_Space: 684
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: c6cf8875-53b9-11e4-aa27-005056972d66
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: c6cf8875-53b9-11e4-aa27-005056972d66:2
Executed_Gtid_Set: c6cf8875-53b9-11e4-aa27-005056972d66:2
Auto_Position: 0
1 row in set (0.00 sec)

my.cnf for master:

[client]
port = 3306
socket = /PROJ/Data/mysql.sock

[mysqld] #Testing with just master-slave settings
server-id = 1 #Server ID may be between 1 and (2^32)-1.
port = 3306 #Default is 3306
socket = /PROJ/Data/mysql.sock

#Directories for instance
datadir = /PROJ/Data
tmpdir = /PROJ/Temp
log-error = /PROJ/Data/mysqld.log
log-bin = /PROJ/Logs/BinLogs/mysql-bin
innodb_log_group_home_dir = /PROJ/Logs
relay-log = /PROJ/Logs/BinLogs/mysql-relay-bin
relay-log-index = /PROJ/Data/mysql-relay-bin.index
user = mysql

#Chain Replication
log_slave_updates = TRUE

#Semi-Synchronous Replication
#Master Configuration File
plugin-load = rpl_sqmi_sync_master:semisync_master.so
rpl_semi_sync_master_enabled = 1
#Slave configuration file
#plugin-load = rpl_semi_sync_slave:semisync_slave.so
#rpl_semi_sync_slave_enabled = 1

#Multi-Threaded Slaves
#slave_parallel_workers = -1 # < 0 to disable otherwise >= 0 (maximum 1 applier thread per db)

#Replication Formats
binlog_format = MIXED # STATEMENT copies query, ROW replaces by val, MIXED chooses between the two in an optimized way
expire_logs_days = 13 #Number of days binlogs will be stored

#Selective Replication (slide 26)
#Database
#Table

#Delayed Replication
#Sql_delay = 0 # Number >=0 in seconds

#Global Transaction Identifiers
enforce_gtid_consistency = TRUE
gtid_mode = ON

#Enabling Crash-Safe Replication
#Sync Files to disc
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
sync_relay_log_info = 1
#Prevent external updates on slaves
#read_only =TRUE
#Store slave INFO in InnoDB tables instead of files
master-info-repository = TABLE
relay-log-info-repository = TABLE
relay-log-recovery = TRUE
#Checksum on SQL updates
master_verify_checksum = TRUE
slave_sql_verify_checksum = TRUE

#Settings for mysqlfailover
#report-host= #When the slave is registering to the master reporting its hostname will enable it to be identified by the specified name
#report-port=3305 #Not really neccessary but the mysqlfailover suggested we use this

tmpdir = /PROJ/Temp
event_scheduler = ON
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 96M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
max_connections = 500
query_cache_size= 128M
query_cache_limit = 128M
query_cache_type = 1
join_buffer_size = 3M
thread_cache_size = 16K
thread_concurrency = 8
binlog_format=mixed
innodb_log_files_in_group = 2
innodb_buffer_pool_size = 2G
innodb_log_file_size = 64M
innodb_log_buffer_size = 4M
innodb_force_recovery = 0
innodb_read_io_threads = 16
innodb_write_io_threads = 16

#Not really relevant for Master-Slave, but used in other utilities
[mysqldump]
quick
max_allowed_packet = 96M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

my.cnf for slave

[client]
port = 3306
socket = /PROJ/Data/mysql.sock

[mysqld] #Testing with just master-slave settings
server-id = 2 #Server ID may be between 1 and (2^32)-1.
port = 3306 #Default is 3306
socket = /PROJ/Data/mysql.sock

#Directories for instance
datadir = /PROJ/Data
tmpdir = /PROJ/Temp
log-error = /PROJ/Data/mysqld.log
log-bin = /PROJ/Logs/BinLogs/mysql-bin
innodb_log_group_home_dir = /PROJ/Logs
relay-log = /PROJ/Logs/BinLogs/mysql-relay-bin
relay-log-index = /PROJ/Data/mysql-relay-bin.index
user = mysql

#Chain Replication
log_slave_updates = TRUE

#Semi-Synchronous Replication
#Master Configuration File
#plugin-load = rpl_sqmi_sync_master:semisync_master.so
#rpl_semi_sync_master_enabled = 1
#Slave configuration file
plugin-load = rpl_semi_sync_slave:semisync_slave.so
rpl_semi_sync_slave_enabled = 1

#Multi-Threaded Slaves
#slave_parallel_workers = -1 # < 0 to disable otherwise >= 0 (maximum 1 applier thread per db)

#Replication Formats
binlog_format = MIXED # STATEMENT copies query, ROW replaces by val, MIXED chooses between the two in an optimized way
expire_logs_days = 13 #Number of days binlogs will be stored

#Selective Replication (slide 26)
#Database
#Table

#Delayed Replication
#Sql_delay = 0 # Number >=0 in seconds

#Global Transaction Identifiers
enforce_gtid_consistency = TRUE
gtid_mode = ON

#Enabling Crash-Safe Replication
#Sync Files to disc
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
sync_relay_log_info = 1
#Prevent external updates on slaves
read_only =TRUE
#Store slave INFO in InnoDB tables instead of files
master-info-repository = TABLE
relay-log-info-repository = TABLE
relay-log-recovery = TRUE
#Checksum on SQL updates
master_verify_checksum = TRUE
slave_sql_verify_checksum = TRUE

#Settings for mysqlfailover
#report-host= #When the slave is registering to the master reporting its hostname will enable it to be identified by the specified name
#report-port=3305 #Not really neccessary but the mysqlfailover suggested we use this

tmpdir = /PROJ/Temp
event_scheduler = ON
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 96M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
max_connections = 500
query_cache_size= 128M
query_cache_limit = 128M
query_cache_type = 1
join_buffer_size = 3M
thread_cache_size = 16K
thread_concurrency = 8
binlog_format=mixed
innodb_log_files_in_group = 2
innodb_buffer_pool_size = 2G
innodb_log_file_size = 64M
innodb_log_buffer_size = 4M
innodb_force_recovery = 0
innodb_read_io_threads = 16
innodb_write_io_threads = 16

#Not really relevant for Master-Slave, but used in other utilities
[mysqldump]
quick
max_allowed_packet = 96M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Does anyone have any ideas why we are getting the message : event not found

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Replication Tools - Event Not Found
3251
March 24, 2015 08:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.