#Master [mysqld] pid-file = /export/umesh/server/binaries/mysql-advanced-5.7.9/run/master.pid socket = /export/umesh/server/binaries/mysql-advanced-5.7.9/run/master.sock log-error=/export/umesh/server/binaries/mysql-advanced-5.7.9/log/master.log slow_query_log_file=/export/umesh/server/binaries/mysql-advanced-5.7.9/log/slow.log general_log_file=/export/umesh/server/binaries/mysql-advanced-5.7.9/log/general.log port = 15000 server-id = 1 basedir = /export/umesh/server/binaries/mysql-advanced-5.7.9 datadir = /export/umesh/server/binaries/mysql-advanced-5.7.9/master tmpdir = /tmp log-bin = /export/umesh/server/binaries/mysql-advanced-5.7.9/log/master-bin log-bin-index = /export/umesh/server/binaries/mysql-advanced-5.7.9/log/master-bin.index binlog_format=STATEMENT #Slave [mysqld] pid-file = /export/umesh/server/binaries/mysql-advanced-5.7.9/run/slave.pid socket = /export/umesh/server/binaries/mysql-advanced-5.7.9/run/slave.sock log-error=/export/umesh/server/binaries/mysql-advanced-5.7.9/log/slave.log port = 15001 server-id = 2 basedir = /export/umesh/server/binaries/mysql-advanced-5.7.9 datadir = /export/umesh/server/binaries/mysql-advanced-5.7.9/slave tmpdir = /tmp relay-log-index = /export/umesh/server/binaries/mysql-advanced-5.7.9/log/slave-relay-bin.index relay-log = /export/umesh/server/binaries/mysql-advanced-5.7.9/log/slave-relay-bin binlog_format=STATEMENT log_slow_slave_statements=ON slow_query_log=ON long_query_time=0 // Startup bin/mysql_install_db --insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/master -v bin/mysql_install_db --insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/slave -v bin/mysqld_safe --defaults-file=./master.cnf & bin/mysqld_safe --defaults-file=./slave.cnf & [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysql_install_db --insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/master -v 2015-07-16 09:11:26 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize 2015-07-16 09:11:26 [NOTE] Creating data directory /export/umesh/server/binaries/mysql-advanced-5.7.9/master 2015-07-16 09:11:26 [NOTE] Executing /export/umesh/server/binaries/mysql-advanced-5.7.9/bin/mysqld --bootstrap --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/master --lc-messages-dir=/export/umesh/server/binaries/mysql-advanced-5.7.9/share --lc-messages=en_US --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 2015-07-16 09:11:28 [NOTE] Creating system tables...done. 2015-07-16 09:11:28 [NOTE] Filling system tables with data...done. 2015-07-16 09:11:28 [NOTE] Filling help table with data...done. 2015-07-16 09:11:28 [NOTE] Creating default user root@localhost 2015-07-16 09:11:28 [NOTE] Creating default proxy root@localhost 2015-07-16 09:11:28 [NOTE] Creating sys schema 2015-07-16 09:11:28 [NOTE] done. 2015-07-16 09:11:30 [WARNING] The bootstrap log isn't empty: 2015-07-16 09:11:30 [WARNING] mysqld: [Warning] --bootstrap is deprecated. Please consider using --initialize instead [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysql_install_db --insecure --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/slave -v 2015-07-16 09:11:38 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize 2015-07-16 09:11:38 [NOTE] Creating data directory /export/umesh/server/binaries/mysql-advanced-5.7.9/slave 2015-07-16 09:11:38 [NOTE] Executing /export/umesh/server/binaries/mysql-advanced-5.7.9/bin/mysqld --bootstrap --datadir=/export/umesh/server/binaries/mysql-advanced-5.7.9/slave --lc-messages-dir=/export/umesh/server/binaries/mysql-advanced-5.7.9/share --lc-messages=en_US --basedir=/export/umesh/server/binaries/mysql-advanced-5.7.9 2015-07-16 09:11:40 [NOTE] Creating system tables...done. 2015-07-16 09:11:40 [NOTE] Filling system tables with data...done. 2015-07-16 09:11:40 [NOTE] Filling help table with data...done. 2015-07-16 09:11:40 [NOTE] Creating default user root@localhost 2015-07-16 09:11:40 [NOTE] Creating default proxy root@localhost 2015-07-16 09:11:40 [NOTE] Creating sys schema 2015-07-16 09:11:40 [NOTE] done. 2015-07-16 09:11:42 [WARNING] The bootstrap log isn't empty: 2015-07-16 09:11:42 [WARNING] mysqld: [Warning] --bootstrap is deprecated. Please consider using --initialize instead [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysqld_safe --defaults-file=./master.cnf & [1] 15859 [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: 150716 09:11:55 mysqld_safe Logging to '/export/umesh/server/binaries/mysql-advanced-5.7.9/log/master.log'. 150716 09:11:55 mysqld_safe Starting mysqld daemon with databases from /export/umesh/server/binaries/mysql-advanced-5.7.9/master [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysqld_safe --defaults-file=./slave.cnf & [2] 16116 [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: 150716 09:12:03 mysqld_safe Logging to '/export/umesh/server/binaries/mysql-advanced-5.7.9/log/slave.log'. 150716 09:12:03 mysqld_safe Starting mysqld daemon with databases from /export/umesh/server/binaries/mysql-advanced-5.7.9/slave -- master [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysql -uroot -S run/master.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.9-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2015, 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> CREATE USER 'repl'@'localhost' IDENTIFIED BY 'slavepass'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> show master status; +-------------------+----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +-------------------+----------+--------------+------------------+-------------------+ | master-bin.000001 | 650 | | | | +-------------------+----------+--------------+------------------+-------------------+ 1 row in set (0.00 sec) mysql> -- slave [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: bin/mysql -uroot -S run/slave.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.9-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2015, 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=15000, -> MASTER_USER='repl', -> MASTER_PASSWORD='slavepass', -> MASTER_LOG_FILE='master-bin.000001', -> MASTER_LOG_POS=650; Query OK, 0 rows affected, 2 warnings (0.01 sec) mysql> show warnings; +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1759 | Sending passwords in plain text without SSL/TLS is extremely insecure. | | Note | 1760 | 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. | +-------+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Master_Host: localhost Master_User: repl Master_Port: 15000 Connect_Retry: 60 Master_Log_File: master-bin.000001 Read_Master_Log_Pos: 650 Relay_Log_File: slave-relay-bin.000001 Relay_Log_Pos: 4 Relay_Master_Log_File: master-bin.000001 Slave_IO_Running: No 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: 650 Relay_Log_Space: 154 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: NULL Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 1142 Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error: SELECT command denied to user 'repl'@'localhost' for table 'global_variables' Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 0 Master_UUID: Master_Info_File: /export/umesh/server/binaries/mysql-advanced-5.7.9/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: 150716 09:15:36 Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0 Replicate_Rewrite_DB: Channel_Name: 1 row in set (0.00 sec) mysql> /export/umesh/server/binaries/mysql-advanced-5.7.9/bin/mysqld, Version: 5.7.9-enterprise-commercial-advanced-log (MySQL Enterprise Server - Advanced Edition (Commercial)). started with: Tcp port: 15000 Unix socket: /export/umesh/server/binaries/mysql-advanced-5.7.9/run/master.sock Time Id Command Argument 2015-07-16T08:29:01.912733Z 4 Query show global variables like "%general_log%" 2015-07-16T08:29:07.541672Z 4 Quit 2015-07-16T08:29:54.650634Z 5 Connect repl@localhost on using TCP/IP 2015-07-16T08:29:54.650764Z 5 Query SELECT UNIX_TIMESTAMP() 2015-07-16T08:29:54.650867Z 5 Query SHOW GLOBAL VARIABLES LIKE 'SERVER_ID' 2015-07-16T08:29:54.650975Z 5 Quit [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.9: