ERROR 29 (HY000): File ‘./mysqld-relay-bin.498088’ not found (Errcode: 2)

Getting Error while starting slave of mysql database:

ERROR 29 (HY000): File './mysqld-relay-bin.498088' not found (Errcode: 2)

Details are as follows:

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show slave status\G;
*************************** 1. row ***************************
               Slave_IO_State:
                  Master_Host: 192.168.12.32
                  Master_User: easy
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.003368
          Read_Master_Log_Pos: 278156040
               Relay_Log_File: mysqld-relay-bin.498088
                Relay_Log_Pos: 143017174
        Relay_Master_Log_File: mysql-bin.003367
             Slave_IO_Running: No
            Slave_SQL_Running: No
              Replicate_Do_DB: infocart
          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: 144091807
              Relay_Log_Space: 0
              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: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
1 row in set (0.00 sec)

ERROR:
No query specified

mysql> start slave;
ERROR 29 (HY000): File './mysqld-relay-bin.498088' not found (Errcode: 2)

 

Asked on September 10, 2019 in MySQL.
Add Comment
1 Answer(s)

This error happen when relay-bin file deleted manually.

To resolve this Edit the file  mysqld-relay-bin.index located at mysql data directory.

Default location of mysql data directory is : /var/lib/mysql

Now open the file to Edit file mysqld-relay-bin.index

./mysqld-relay-bin.000001
./mysqld-relay-bin.000002

 

Now delete the relay-bin file which is not there.

then save the file and start the slave.

Answered on September 10, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.