Now run these commands
Stop Slave;
Change Master to Master_Host='11.44.66.9';
Start Slave;
Show Slave Status \G;
Verify the output.
Last_SQL_Error
No PowerDNS replication taking place and in “show slave status \G;” command in mysql, the errors were noted:
Last_SQL_Errno: 1062
Last_SQL_Error: Error……
To resolve this, set the SQL_Slave_Skip_Counter to 1 in mysql with the following command. First log into the PowerDNS server using SSH.
Stop Slave;
Set Global SQL_Slave_Skip_Counter = 1 ;
Start Slave;
Show Slave Status \G;
Is the Error is still present, try running the command again and increment the value from 1 to 2 and so on. If you’re tired of the trial and error test, try putting in 100 or a larger number.
Slave Server – Slave_IO_Running: No
Issue: Slave_IO_Running: No
No replication to the slave server. The Master_Log_File and Master_Log_File needs to be correct.
1. SSH into the master server.
2. Connect to mysql
# mysql -u root -p
3. Enter in your mysql root password when prompted.
4. On the mysql prompt type the following command:
Show Master Status \G;
Make a note of the File and Position. The output below shows mysql-bin.000002 for File and 5613 for position.
Output:
mysql> Show Master Status \G;
*************************** 1. row ***************************
File: mysql-bin.000002
Position: 5613
Binlog_Do_DB: powerdns
Binlog_Ignore_DB:
1 row in set (0.00 sec)
ERROR:
No query specified
5. Open an new session and SSH into the slave server.
6. Connect to mysql with the following command:
mysql -u root -u
7. Enter in your mysql root password when prompted.
8. On the mysql prompt run the following command:
Show Slave Status \G;
Look for the values in Master_Log_File and Read_Master_Log_Pos. They should correspond to the File and Position noted above. If not, they will need to be changed on the slave server. The steps to follow will demonstrate how to make the change.
9. Stop the slave.
Stop Slave;
10. Change Master_Log_Pos. Enter in the number noted above in the “111” value below.
Change Master to Master_Log_Pos = 111;
11. Change Master_Log_File. Make sure the mysql-bin matched what was noted above.
Change Master to Master_Log_File = 'mysql-bin.000332';
12. Start the slave.
Start Slave;
13. Run the follow command and verify that Slave_IO_Running is yes.
Show Slave Status \G;