Description:
i am setting up a mysql cluster with 5 node,one for mater(write) and others for slave(read).after a set up ,in slave node , i cant not connect to master node and i
must run common in shell terminal mysql -u name -h master -p ,and then stop slave 、star slave to workaround this issue
How to repeat:
1. in node a, set my.conf like this and restart
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
character_set_server=utf8
init_connect='SET NAMES utf8'
port=3306
server_id=25
log-bin=/var/lib/mysql/mysql-bin
binlog-do-db=seis
log-slave-updates=1
slave-skip-errors=1
table_open_cache=2048
join_buffer_size=64M
sort_buffer_size=8M
read_buffer_size=8M
read_rnd_buffer_size=8M
max_connections=1024
max_allowed_packet=32M
thread_cache_size=120
innodb_buffer_pool_size=10G
innodb_log_file_size=64M
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=0
innodb_flush_method=O_DIRECT
innodb_thread_concurrency=120
innodb_file_per_table=1
innodb_open_files=512
ngram_token_size=2
2. in node b
stop slave;
change master to master_host='172.16.31.XX',master_port=3306,master_user='xxx',master_password='xxx',master_log_file='mysql-bin.000001',master_log_pos=6889;
3. in node b
start slave;
show slave status\G;
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Last_IO_Errno: 2061
Last_IO_Error: error connecting to master 'seis_re@xxx:3306' - retry-time: 60 retries: 1
4. in node b shell cmd line,and romote acces mysql pass
mysql -u xxx -h xxx -p
5. in node b run cmd
stop slave;
start slave;
show slave status\G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Suggested fix:
Description: i am setting up a mysql cluster with 5 node,one for mater(write) and others for slave(read).after a set up ,in slave node , i cant not connect to master node and i must run common in shell terminal mysql -u name -h master -p ,and then stop slave 、star slave to workaround this issue How to repeat: 1. in node a, set my.conf like this and restart datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid character_set_server=utf8 init_connect='SET NAMES utf8' port=3306 server_id=25 log-bin=/var/lib/mysql/mysql-bin binlog-do-db=seis log-slave-updates=1 slave-skip-errors=1 table_open_cache=2048 join_buffer_size=64M sort_buffer_size=8M read_buffer_size=8M read_rnd_buffer_size=8M max_connections=1024 max_allowed_packet=32M thread_cache_size=120 innodb_buffer_pool_size=10G innodb_log_file_size=64M innodb_log_buffer_size=8M innodb_flush_log_at_trx_commit=0 innodb_flush_method=O_DIRECT innodb_thread_concurrency=120 innodb_file_per_table=1 innodb_open_files=512 ngram_token_size=2 2. in node b stop slave; change master to master_host='172.16.31.XX',master_port=3306,master_user='xxx',master_password='xxx',master_log_file='mysql-bin.000001',master_log_pos=6889; 3. in node b start slave; show slave status\G; Slave_IO_Running: Connecting Slave_SQL_Running: Yes Last_IO_Errno: 2061 Last_IO_Error: error connecting to master 'seis_re@xxx:3306' - retry-time: 60 retries: 1 4. in node b shell cmd line,and romote acces mysql pass mysql -u xxx -h xxx -p 5. in node b run cmd stop slave; start slave; show slave status\G; Slave_IO_Running: Yes Slave_SQL_Running: Yes Suggested fix: