-- slave's conf [mysqld] log_bin=/export/umesh/server/binaries/GABuilds/mysql-5.5.60/slave/log-bin log_bin_index=/export/umesh/server/binaries/GABuilds/mysql-5.5.60/slave/log-bin.index server_id=100 master_verify_checksum=ON sync_binlog=1 log_bin_trust_function_creators=1 expire_logs_days=2 binlog_format=ROW binlog_cache_size=65536 binlog_row_image=MINIMAL binlog-ignore-db="my_trash_db" # Slaves read_only=1 log_slave_updates=1 master_info_repository=TABLE relay_log_info_repository=TABLE relay_log_recovery=ON replicate-do-db="foo" replicate-do-db="bar" replicate-wild-ignore-table="%.foobar\_%" report-host=myhostname slave_net_timeout=60 rm -rf master/ scripts/mysql_install_db --basedir=$PWD --datadir=$PWD/master bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/master --socket=/tmp/mysql_master.sock --port=3307 --log-error=$PWD/master/log.err --server_id=1 --log_bin --binlog-format=statement 2>&1 & rm -rf /ramdisk/umshastr/ rm -rf slave/ mkdir slave/ mkdir -p /ramdisk/umshastr scripts/mysql_install_db --basedir=$PWD --datadir=/ramdisk/umshastr bin/mysqld --defaults-file=./72143.cnf --basedir=$PWD --datadir=/ramdisk/umshastr --socket=/tmp/mysql_slave.sock --port=3308 --log-error=/ramdisk/umshastr/log.err 2>&1 & -- master [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.6.40: bin/mysql -uroot -S /tmp/mysql_master.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.40-log MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> show master status; +------------------+----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +------------------+----------+--------------+------------------+-------------------+ | hod03-bin.000001 | 1188 | | | | +------------------+----------+--------------+------------------+-------------------+ 1 row in set (0.01 sec) -- slave [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-5.5.60: bin/mysql -uroot -S /tmp/mysql_slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.40-log MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CHANGE MASTER TO -> MASTER_HOST='localhost', -> MASTER_PORT=3307, -> MASTER_USER='repl', -> MASTER_PASSWORD='slavepass', -> MASTER_LOG_FILE='hod03-bin.000001', -> MASTER_LOG_POS=1188; Query OK, 0 rows affected, 2 warnings (0.00 sec) mysql> start slave; Query OK, 0 rows affected (0.01 sec) mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: localhost Master_User: repl Master_Port: 3307 Connect_Retry: 60 Master_Log_File: hod03-bin.000001 Read_Master_Log_Pos: 1188 Relay_Log_File: hod03-relay-bin.000002 Relay_Log_Pos: 283 Relay_Master_Log_File: hod03-bin.000001 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: foo,bar Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: %.foobar\_% Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 1188 Relay_Log_Space: 456 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: db54d791-486e-11e8-b5d8-0010e05f3e06 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: Executed_Gtid_Set: Auto_Position: 0 1 row in set (0.00 sec) mysql> ## [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 4.2G 12G 26% /ramdisk [umshastr@hod03]/ramdisk/umshastr: ls -l /ramdisk/umshastr/ total 110616 -rw-rw---- 1 umshastr common 56 Apr 25 11:59 auto.cnf -rw-rw---- 1 umshastr common 5 Apr 25 11:59 hod03.pid -rw-rw---- 1 umshastr common 173 Apr 25 12:02 hod03-relay-bin.000001 -rw-rw---- 1 umshastr common 283 Apr 25 12:02 hod03-relay-bin.000002 -rw-rw---- 1 umshastr common 50 Apr 25 12:02 hod03-relay-bin.index -rw-rw---- 1 umshastr common 12582912 Apr 25 12:02 ibdata1 -rw-rw---- 1 umshastr common 50331648 Apr 25 12:02 ib_logfile0 -rw-rw---- 1 umshastr common 50331648 Apr 25 11:59 ib_logfile1 -rw-rw---- 1 umshastr common 3105 Apr 25 12:02 log.err drwx------ 2 umshastr common 1620 Apr 25 11:59 mysql drwx------ 2 umshastr common 1100 Apr 25 11:59 performance_schema drwx------ 2 umshastr common 40 Apr 25 11:59 test -- create large files and fill disk [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 1.2M 100% /ramdisk -- start loading on master -- Slave 018-04-25 12:15:52 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000003' at position 120 2018-04-25 12:16:34 8208 [Warning] Disk is full writing './hod03-relay-bin.~rec~' (Errcode: 28 - No space left on device). Waiting for someone to free space... 2018-04-25 12:16:34 8208 [Warning] Retry in 60 secs. Message reprinted in 600 secs -- truncated error log on slave [umshastr@hod03]/ramdisk/umshastr: ls -lh total 12G -rw-rw---- 1 umshastr common 56 Apr 25 11:59 auto.cnf -rw-rw---- 1 umshastr common 5 Apr 25 11:59 hod03.pid -rw-rw---- 1 umshastr common 336 Apr 25 12:15 hod03-relay-bin.000007 -rw-rw---- 1 umshastr common 336 Apr 25 12:16 hod03-relay-bin.000008 -rw-rw---- 1 umshastr common 50 Apr 25 12:15 hod03-relay-bin.index -rw-rw---- 1 umshastr common 0 Apr 25 12:18 hod03-relay-bin.~rec~ -rw-rw---- 1 umshastr common 12M Apr 25 12:15 ibdata1 -rw-rw---- 1 umshastr common 48M Apr 25 12:15 ib_logfile0 -rw-rw---- 1 umshastr common 48M Apr 25 11:59 ib_logfile1 -rw-rw---- 1 umshastr common 5.1K Apr 25 12:16 log.err drwx------ 2 umshastr common 1.6K Apr 25 11:59 mysql drwx------ 2 umshastr common 1.1K Apr 25 11:59 performance_schema drwx------ 2 umshastr common 40 Apr 25 11:59 test -rw-r--r-- 1 umshastr common 880M Apr 25 12:08 test1.img -rw-r--r-- 1 umshastr common 1.0M Apr 25 12:14 test3.img -rw-r--r-- 1 umshastr common 100K Apr 25 12:14 test4.img -rw-r--r-- 1 umshastr common 31K Apr 25 12:16 test5.img -rw-r--r-- 1 umshastr common 11G Apr 25 12:08 test.img [umshastr@hod03]/ramdisk/umshastr: vi log.err [umshastr@hod03]/ramdisk/umshastr: ls -lh total 12G -rw-rw---- 1 umshastr common 56 Apr 25 11:59 auto.cnf -rw-rw---- 1 umshastr common 5 Apr 25 11:59 hod03.pid -rw-rw---- 1 umshastr common 336 Apr 25 12:15 hod03-relay-bin.000007 -rw-rw---- 1 umshastr common 336 Apr 25 12:16 hod03-relay-bin.000008 -rw-rw---- 1 umshastr common 50 Apr 25 12:15 hod03-relay-bin.index -rw-rw---- 1 umshastr common 0 Apr 25 12:18 hod03-relay-bin.~rec~ -rw-rw---- 1 umshastr common 12M Apr 25 12:15 ibdata1 -rw-rw---- 1 umshastr common 48M Apr 25 12:15 ib_logfile0 -rw-rw---- 1 umshastr common 48M Apr 25 11:59 ib_logfile1 -rw-rw---- 1 umshastr common 3.9K Apr 25 12:19 log.err drwx------ 2 umshastr common 1.6K Apr 25 11:59 mysql drwx------ 2 umshastr common 1.1K Apr 25 11:59 performance_schema drwx------ 2 umshastr common 40 Apr 25 11:59 test -rw-r--r-- 1 umshastr common 880M Apr 25 12:08 test1.img -rw-r--r-- 1 umshastr common 1.0M Apr 25 12:14 test3.img -rw-r--r-- 1 umshastr common 100K Apr 25 12:14 test4.img -rw-r--r-- 1 umshastr common 31K Apr 25 12:16 test5.img -rw-r--r-- 1 umshastr common 11G Apr 25 12:08 test.img -- stop/start/show slave status on slave [umshastr@hod03]/ramdisk/umshastr: cat log.err 2018-04-25 12:22:34 8208 [ERROR] Error writing relay log configuration. 2018-04-25 12:22:34 8208 [Note] Slave I/O thread killed while reading event 2018-04-25 12:22:34 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000008', position 120 2018-04-25 12:22:34 8208 [ERROR] Error writing master configuration. 2018-04-25 12:23:15 8208 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-04-25 12:23:15 8208 [Note] Slave SQL thread initialized, starting replication in log 'hod03-bin.000004' at position 4, relay log './hod03-relay-bin.000009' position: 167 2018-04-25 12:23:15 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000008' at position 120 [umshastr@hod03]/ramdisk/umshastr: [umshastr@hod03]/ramdisk/umshastr: [umshastr@hod03]/ramdisk/umshastr: ls -lh total 12G -rw-rw---- 1 umshastr common 56 Apr 25 11:59 auto.cnf -rw-rw---- 1 umshastr common 5 Apr 25 11:59 hod03.pid -rw-rw---- 1 umshastr common 289 Apr 25 12:24 hod03-relay-bin.000027 -rw-rw---- 1 umshastr common 236 Apr 25 12:24 hod03-relay-bin.000028 -rw-rw---- 1 umshastr common 50 Apr 25 12:24 hod03-relay-bin.index -rw-rw---- 1 umshastr common 12M Apr 25 12:24 ibdata1 -rw-rw---- 1 umshastr common 48M Apr 25 12:24 ib_logfile0 -rw-rw---- 1 umshastr common 48M Apr 25 11:59 ib_logfile1 -rw-rw---- 1 umshastr common 964 Apr 25 12:23 log.err drwx------ 2 umshastr common 1.6K Apr 25 11:59 mysql drwx------ 2 umshastr common 1.1K Apr 25 11:59 performance_schema drwx------ 2 umshastr common 40 Apr 25 11:59 test -rw-r--r-- 1 umshastr common 880M Apr 25 12:08 test1.img -rw-r--r-- 1 umshastr common 100K Apr 25 12:14 test4.img -rw-r--r-- 1 umshastr common 11G Apr 25 12:08 test.img [umshastr@hod03]/ramdisk/umshastr: fallocate -l 1024k test5.img [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 36K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 36K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: ls -lh total 12G -rw-rw---- 1 umshastr common 56 Apr 25 11:59 auto.cnf -rw-rw---- 1 umshastr common 5 Apr 25 11:59 hod03.pid -rw-rw---- 1 umshastr common 289 Apr 25 12:24 hod03-relay-bin.000027 -rw-rw---- 1 umshastr common 236 Apr 25 12:24 hod03-relay-bin.000028 -rw-rw---- 1 umshastr common 50 Apr 25 12:24 hod03-relay-bin.index -rw-rw---- 1 umshastr common 12M Apr 25 12:24 ibdata1 -rw-rw---- 1 umshastr common 48M Apr 25 12:24 ib_logfile0 -rw-rw---- 1 umshastr common 48M Apr 25 11:59 ib_logfile1 -rw-rw---- 1 umshastr common 964 Apr 25 12:23 log.err drwx------ 2 umshastr common 1.6K Apr 25 11:59 mysql drwx------ 2 umshastr common 1.1K Apr 25 11:59 performance_schema drwx------ 2 umshastr common 40 Apr 25 11:59 test -rw-r--r-- 1 umshastr common 880M Apr 25 12:08 test1.img -rw-r--r-- 1 umshastr common 100K Apr 25 12:14 test4.img -rw-r--r-- 1 umshastr common 11G Apr 25 12:08 test.img [umshastr@hod03]/ramdisk/umshastr: fallocate -l 1024k test5.img [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 36K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 36K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 36K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: fallocate -l 28k test6.img [umshastr@hod03]/ramdisk/umshastr: df -h /ramdisk/umshastr/ Filesystem Size Used Avail Use% Mounted on tmpfs 16G 16G 8.0K 100% /ramdisk [umshastr@hod03]/ramdisk/umshastr: fallocate -l 7k test7.img [umshastr@hod03]/ramdisk/umshastr: cat log.err 2018-04-25 12:22:34 8208 [ERROR] Error writing relay log configuration. 2018-04-25 12:22:34 8208 [Note] Slave I/O thread killed while reading event 2018-04-25 12:22:34 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000008', position 120 2018-04-25 12:22:34 8208 [ERROR] Error writing master configuration. 2018-04-25 12:23:15 8208 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-04-25 12:23:15 8208 [Note] Slave SQL thread initialized, starting replication in log 'hod03-bin.000004' at position 4, relay log './hod03-relay-bin.000009' position: 167 2018-04-25 12:23:15 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000008' at position 120 2018-04-25 12:26:46 8208 [Note] Error reading relay log event: slave SQL thread was killed 2018-04-25 12:26:46 8208 [Note] Slave I/O thread killed while reading event 2018-04-25 12:26:46 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000011', position 508 2018-04-25 12:27:09 8208 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-04-25 12:27:09 8208 [Note] Slave SQL thread initialized, starting replication in log 'hod03-bin.000011' at position 508, relay log './hod03-relay-bin.000032' position: 624 2018-04-25 12:27:09 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000011' at position 508 2018-04-25 12:27:09 8208 [Warning] Disk is full writing './hod03-relay-bin.~rec~' (Errcode: 28 - No space left on device). Waiting for someone to free space... 2018-04-25 12:27:09 8208 [Warning] Retry in 60 secs. Message reprinted in 600 secs [umshastr@hod03]/ramdisk/umshastr: cat log.err 2018-04-25 12:22:34 8208 [ERROR] Error writing relay log configuration. 2018-04-25 12:22:34 8208 [Note] Slave I/O thread killed while reading event 2018-04-25 12:22:34 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000008', position 120 2018-04-25 12:22:34 8208 [ERROR] Error writing master configuration. 2018-04-25 12:23:15 8208 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-04-25 12:23:15 8208 [Note] Slave SQL thread initialized, starting replication in log 'hod03-bin.000004' at position 4, relay log './hod03-relay-bin.000009' position: 167 2018-04-25 12:23:15 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000008' at position 120 2018-04-25 12:26:46 8208 [Note] Error reading relay log event: slave SQL thread was killed 2018-04-25 12:26:46 8208 [Note] Slave I/O thread killed while reading event 2018-04-25 12:26:46 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000011', position 508 2018-04-25 12:27:09 8208 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 2018-04-25 12:27:09 8208 [Note] Slave SQL thread initialized, starting replication in log 'hod03-bin.000011' at position 508, relay log './hod03-relay-bin.000032' position: 624 2018-04-25 12:27:09 8208 [Note] Slave I/O thread: connected to master 'repl@localhost:3307',replication started in log 'hod03-bin.000011' at position 508 2018-04-25 12:27:09 8208 [Warning] Disk is full writing './hod03-relay-bin.~rec~' (Errcode: 28 - No space left on device). Waiting for someone to free space... 2018-04-25 12:27:09 8208 [Warning] Retry in 60 secs. Message reprinted in 600 secs 2018-04-25 12:28:09 8208 [ERROR] MYSQL_BIN_LOG::add_log_to_index failed to copy index file to crash safe index file. 2018-04-25 12:28:09 8208 [ERROR] Could not use ./hod03-relay-bin.000033 for logging (error 0). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it. 2018-04-25 12:28:09 8208 [ERROR] Could not open ./hod03-relay-bin.000033 for logging (error 0). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it. 2018-04-25 12:28:09 8208 [ERROR] Slave I/O: Relay log write failure: could not queue event from master, Error_code: 1595 2018-04-25 12:28:09 8208 [ERROR] Slave I/O: Relay log write failure: could not queue event from master, Error_code: 1595 2018-04-25 12:28:09 8208 [Note] Slave I/O thread exiting, read up to log 'hod03-bin.000011', position 508 2018-04-25 12:28:09 8208 [ERROR] next log error: -2 offset: 50 log: ./hod03-relay-bin.000032 included: 0 2018-04-25 12:28:09 8208 [ERROR] Error reading relay log event: Error purging processed logs 2018-04-25 12:28:09 8208 [ERROR] Slave SQL: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: 1594 2018-04-25 12:28:09 8208 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'hod03-bin.000011' position 508 2018-04-25 12:28:47 8208 [Warning] Storing MySQL [umshastr@hod03]/ramdisk/umshastr: -- looks like after waiting it is actually "Turning logging off for the whole duration of the MySQL server process" mysql> stop slave; Query OK, 0 rows affected (0.00 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) mysql> show slave status\G ^CCtrl-C -- sending "KILL QUERY 19" to server ...