-- 8.0.4 rm -rf master/ bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/master --log-error-verbosity=3 bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/master --core-file --socket=/tmp/mysql_master.sock --port=3307 --log-error=$PWD/master/log.err --server_id=1 --log_bin 2>&1 & rm -rf slave/ bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/slave --log-error-verbosity=3 bin/mysqld --no-defaults --basedir=$PWD --datadir=$PWD/slave --core-file --socket=/tmp/mysql_slave.sock --port=3308 --log-error=$PWD/slave/log.err --server_id=2 --log_bin 2>&1 & CREATE USER 'repl'@'127.0.0.1' IDENTIFIED WITH caching_sha2_password BY 'slavepass'; GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1'; FLUSH PRIVILEGES; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3307, MASTER_USER='repl', MASTER_PASSWORD='slavepass'; --master [umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.4: bin/mysql -uroot -S /tmp/mysql_master.sock --prompt='master>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 8.0.4-rc-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. master>CREATE USER 'repl'@'127.0.0.1' IDENTIFIED WITH caching_sha2_password BY 'slavepass'; Query OK, 0 rows affected (0.00 sec) master>GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1'; Query OK, 0 rows affected (0.00 sec) master>FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) --slave [umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.4: bin/mysql -uroot -S /tmp/mysql_slave.sock --prompt='Slave>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 8.0.4-rc-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. Slave> CHANGE MASTER TO -> MASTER_HOST='127.0.0.1', -> MASTER_PORT=3307, -> MASTER_USER='repl', -> MASTER_PASSWORD='slavepass'; Query OK, 0 rows affected, 2 warnings (0.01 sec) Slave>start slave; Query OK, 0 rows affected (0.00 sec) Slave>show slave status\G *************************** 1. row *************************** Slave_IO_State: Connecting to master Master_Host: 127.0.0.1 Master_User: repl Master_Port: 3307 Connect_Retry: 60 Master_Log_File: Read_Master_Log_Pos: 4 Relay_Log_File: hod03-relay-bin.000001 Relay_Log_Pos: 4 Relay_Master_Log_File: Slave_IO_Running: Connecting 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: 0 Relay_Log_Space: 155 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: 2061 Last_IO_Error: error connecting to master 'repl@127.0.0.1:3307' - retry-time: 60 retries: 1 Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 0 Master_UUID: 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 more updates Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: 180308 13:42:29 Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: Master_public_key_path: Get_master_public_key: 0 1 row in set (0.00 sec) -- from commandline [umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.4: bin/mysql -urepl -p --port=3307 --host=127.0.0.1 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.4-rc-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> show grants; +------------------------------------------------------+ | Grants for repl@127.0.0.1 | +------------------------------------------------------+ | GRANT REPLICATION SLAVE ON *.* TO `repl`@`127.0.0.1` | +------------------------------------------------------+ 1 row in set (0.00 sec) mysql> ## Stop/start seems to help Slave>stop slave; Query OK, 0 rows affected (0.00 sec) Slave>start slave; Query OK, 0 rows affected (0.00 sec) Slave>show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: repl Master_Port: 3307 Connect_Retry: 60 Master_Log_File: hod03-bin.000001 Read_Master_Log_Pos: 850 Relay_Log_File: hod03-relay-bin.000002 Relay_Log_Pos: 1064 Relay_Master_Log_File: hod03-bin.000001 Slave_IO_Running: Yes <----------------------------- connected 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: 850 Relay_Log_Space: 1272 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: 082ee48d-22ce-11e8-b6e0-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 more updates 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 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: Master_public_key_path: Get_master_public_key: 0 1 row in set (0.00 sec) -- extract from slave's error log [umshastr@hod03]/export/umesh/server/binaries/Trunk/mysql-8.0.4: cat slave/log.err 2018-03-08T12:41:46.843077Z 0 [System] [MY-010116] /export/umesh/server/binaries/Trunk/mysql-8.0.4/bin/mysqld (mysqld 8.0.4-rc-log) starting as process 20890 ... 2018-03-08T12:41:47.742405Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed. 2018-03-08T12:41:47.763126Z 0 [System] [MY-010931] /export/umesh/server/binaries/Trunk/mysql-8.0.4/bin/mysqld: ready for connections. Version: '8.0.4-rc-log' socket: '/tmp/mysql_slave.sock' port: 3308 MySQL Community Server (GPL). 2018-03-08T12:42:25.864531Z 6 [Warning] [MY-010604] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=hod03-relay-bin' to avoid this problem. 2018-03-08T12:42:25.870107Z 6 [System] [MY-010597] 'CHANGE MASTER TO FOR CHANNEL '' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='127.0.0.1', master_port= 3307, master_log_file='', master_log_pos= 4, master_bind=''. 2018-03-08T12:42:29.856303Z 7 [Warning] [MY-010897] 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-03-08T12:42:29.856885Z 7 [ERROR] [MY-002061] Slave I/O for channel '': error connecting to master 'repl@127.0.0.1:3307' - retry-time: 60 retries: 1, Error_code: 2061 2018-03-08T12:43:29.857283Z 7 [ERROR] [MY-002061] Slave I/O for channel '': error connecting to master 'repl@127.0.0.1:3307' - retry-time: 60 retries: 2, Error_code: 2061 2018-03-08T12:44:30.455204Z 9 [Warning] [MY-010897] 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-03-08T12:44:30.455626Z 9 [System] [MY-010562] Slave I/O thread for channel '': connected to master 'repl@127.0.0.1:3307',replication started in log 'FIRST' at position 4