Invalid MySQL I / O Flow

I set up replication for the MySQL server. I can connect from the slave machine to the main server using the replication user / password. I have a slave SQL thread running, but the slave I / O thread is not running, and the slave I / O status becomes empty when checked using the show slave status. What could be the problem?

How can i solve this? Restarting a subordinate does not help.

This was my bad: instead of granting the slication replication privilege *.*, I only provided it for my_db.*.

+3
source share
3 answers

, " slave '., my_db. *.

- ( ), , ,

GRANT REPLICATION SLAVE on mydb.* TO 'someuser'@'%';

, //.

, :

GRANT REPLICATION SLAVE on *.* TO 'someuser'@'%';

a START SLAVE. mysql.

, .

+3

,

- [mysqld] my.cnf my.ini slave-skip-errors=1046 , , , .

1.STOP SLAVE;

2. ;

3.CHANGE MASTER TO MASTER_LOG_FILE = 'mysql-bin.000049';

Note: MASTER_LOG_FILE must be the last file where it stop from replicating

4.CHANGE MASTER TO MASTER_LOG_POS = 98;

5.START SLAVE;

,

+3

. http://www.percona.com/forums/questions-discussions/percona-xtrabackup/11842-backup-stopped-working-slave-sql-running-no

, @Luxknight007, 2. , . - , , .

" , binlog (, , , ). , binlog , slave sql_thread. , binlog ( , Read_Master_Log_Pos , Exec_Master_Log_Pos, , binlog, , sql_thread), binlog, slave-sql_thread . - :

:

2013-10-08 12:48:51 37545 [ERROR] Slave SQL: Error 'Table 'testdb.test2' doesn't exist' on query. Default database: 'testdb'. Query: 'insert into test1 select * from test2', Error_code: 1146
2013-10-08 12:48:51 37545 [Warning] Slave: Table 'testdb.test2' doesn't exist Error_code: 1146
2013-10-08 12:48:51 37545 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000001' position 3427

, , . , ERROR , . , , ( " log 'mysql-bin.000001" 3427 " ). 315098143 slave-, slave sql_thread (Exec_Master_Log_Pos), io_thread (Read_Master_Log_Pos).

, binlog, , , . , - "newcrmdb1-bin.XXXXXX", mysql-bin.XXXXXX( slave- ).

:

mysql> change master to MASTER_LOG_FILE='newcrmdb1-bin.XXXXXX', Master_Log_Pos=315098143;

change master to MASTER_LOG_FILE='mysql-bin.000082' , Master_Log_Pos=47914844;

, slave sql_thread, , .

, asteriskcdr. bpleadcf , insert , . , , , . , , , , master mysqldump . , , sql_slave_skip_counter, .

And if all else fails, you can always restore the workstation from the master as a last resort. =) "

+1
source

Source: https://habr.com/ru/post/1722720/


All Articles