Jump to Navigation

082 - MySQL Slave ERROR 1201

If you get the following error, You should recreate a slave database.
It might be easy to fix the problem.

1. Stop slave

mysql> stop slave;

2. Delete files

/var/run/mysqld
mysql-relay-bin.000000x, mysql-relay-bin.index

/var/lib/mysql
master.info

3. using mysqldump on the master server

[MyServer]# mysqldump -u root -pmypassword --all-databases > dumpdb.sql

4. Send the dump to the salve server and import the dump on slave server

[MyServer]# mysql -u root -pmypassword < dumpdb.sql

5. Show master status

mysql> show master status;

6. Change Master configuration

 mysql> CHANGE MASTER TO
 > MASTER_HOST='master_server',
 > MSATER_USER='repl',
 > MASTER_PASSWORD='replpassword',
 > MASTER_LOG_FILE='mysql-bin.000001',
 > MASTER_LOG_POS=567;

7. Start slave

mysql> start slave;

8. Check slave status

mysql> show slave status\G

 

MySQL:


Main menu 2

Story | by Dr. Radut