I/o Error Reading The Header From The Binary Log
to start mysql ,i got the following error : 121010 13:57:47 [ERROR] I/O error reading the header from the binary log, errno=175, io cache code=0 121010 13:57:47 [ERROR] I/O error reading the header from the binary log 121010 13:57:47 [ERROR] Can't init tc log 121010 13:57:47 [ERROR] Aborting This means that you have a problem related to binary log files , the binary logs are broken, or at least the last one is. They are usually located in /var/logs/mysql/ and you should not start copying over some old logs with the new name because that would just not make it right, so the solution is, read your logs and see which *.bin file is corrupted delete it open /var/log/mysql/mysql-bin.index and delete the line with the bin file on it. Restart mysql
Categories: Mysql Open FTP Port 21 and 20 in Iptables firewall HyperVM Installation Comments are currently closed. Search Here... Recent Posts How to install Vmware Vcenter server step by step How To Install SQL 2008 R2 on Windows Server 2008 R2 For Use With Vcenter How to determine if a disk is SSD or HDD on Linux Check if Archivelog mode is enabled Determine the Oracle Database Uptime Categories Apache (2) Benchmarking (1) CitrixXen (3) Cpanel (5) DBs (1) DNS (2) Exim (3) Fireawall (3) IIS (1) Linux (19) MSSQL Server (1) Mysql (10) Network (2) Oracle (4) Others (2) Plesk (3) Storag (3) Uncategorized (2) Virtualization (4) Windows (9) Xen (4) Zpanel (1) Archives Archives Select Month January 2016 (3) December 2015 (2) November 2015 (2) October 2015 (3) September 2015 (1) April 2015 (4) March 2015 (2) April 2014 (1) March 2014 (1) October 2013 (1) August 2013 (1) July 2013 (5) April 2013 (1) March 2013 (2) February 2013 (2) January 2013 (6) November 2012 (4) October 2012 (4) September 2012 (7) August 2012 (5) July 2012 (1) June 2012 (6) May 2012 (6) April 2012 (1) March 2012 (1) February 2012 (11) Connect with: Join the mailing listYour Name:E-mail:*Type the characters you see here:SubmitReset Copyright © 2015 Raafat IT blog Theme created by PWT. Powered by WordPress.orgCommunity Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: Replication :: Slave stop when flush logs (the return) New Topic Advanced Search Slave stop when flush logs (the return) Posted by: eric () Date: August 18, 2010 02:40AM Hello, It's the continuation of the post http://forums.mysql.com/read.php?26,377336 (sorry I can't reply on the previous post for an unknow reason from me ...) My problem has occured again: the slave on the host #2 has crashed just after the flush logs. I use a dual replication between 2 hosts : each host is master and slave for the http://raafat.tawasol.net/mysql-crashes-io-error/ other. The version is "5.0.67" on both hosts. Tables are all MyISAM. The flush is done with the command: FLUSH USER_RESOURCES Same error as previously has been recorded in the errors log: 100812 0:30:01 [ERROR] next log error: -1 offset: 51 log: /u3/local/mysql/slave/repl/host2-relay-bin.000064 included: 1 100812 0:30:01 [ERROR] Error reading relay log event: Error purging processed logs When the slave has been stopped, it was http://forums.mysql.com/read.php?26,381314 pointing exactly at the end of the relay bin log. SLAVE STATUS displays: Relay_Log_File: host2-relay-bin.000064 Relay_Log_Pos: 7058484 %mysqlbinlog host2-relay-bin.000064 | tail /*!*/; # at 7058434 #100812 0:30:01 server id 6 end_log_pos 7058484 Rotate to host2-relay-bin.000065 pos: 4 DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; The next relay bin log "host2-relay-bin.000065" has been created normally by the IO Thread but it has been never read by the SQL Thread. One more thing weird : in the MySQL errors log I have seen that the parameter values of "CHANGE MASTER" are repeated many times (about every 5 secondes). This problem occurs in average 3 or 4 times by month. Each time I must reset and restart the slave (and sometimes restart the mysqld server like this morning). I get 2 kind of error, the error above and the following: 100818 0:35:01 [ERROR] I/O error reading the header from the binary log, errno=-1, io cache code=0 Thank you for your help, ~~~ Eric Navigate:Previous Message•Next Message Options:Reply•Quote Subject Views Written By Posted Slave stop when flush logs (the return) 3409 eric 08/18/2010 02:40AM Re: Slave stop
Importance Assigned to Milestone https://bugs.launchpad.net/bugs/677396 Percona Server Edit Invalid Undecided Alexey Kopytov Edit Percona Server 11.6 You need to log in to change this bug's http://perplexed.co.uk/301_restoring_a_broken_slave.htm status. Affecting: Percona Server Filed here by: Aleksandr Kuzminsky When: 2010-11-19 Assigned: 2010-11-19 Completed: 2012-06-25 Target Distribution Baltix BOSS i/o error Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Milestone Invalid Undecided Percona Server 11.6 Assigned to Me Alexey Kopytov (akopytov) i/o error reading Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description rpl.rpl_stm_until [ fail ] Found warnings/errors in server log file! Test ended at 2010-11-19 02:19:58 line 101119 10:19:58 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'I/O error reading the header from the binary log', Error_code: 1236 ^ Found warnings in /home/buildbot/slaves/percona-server-51-11/RPM_CentOS_4_x86_64/work/BUILD/Percona-Server/mysql-test/var/log/mysqld.2.err ok line 101119 10:19:58 [ERROR] I/O error reading the header from the binary log, errno=-1, io cache code=0 ^ Found warnings in /home/buildbot/slaves/percona-server-51-11/RPM_CentOS_4_x86_64/work/BUILD/Percona-Server/mysql-test/var/log/mysqld.1.err ok - saving '/home/buildbot/slaves/percona-server-51-11/RPM_CentOS_4_x86_64/work/BUILD/Percona-Server/mysql-test/var/log/rpl.rpl_stm_until/' to '/home/buildbot/slaves/percona-server-51-11/RPM_CentOS_4_x86_64/work/BUILD/Percona-Server/mysql-test/var/log/rpl.rpl_stm_until/' Retrying test, attempt(2/3)... rpl.rpl_stm_until [ retry-fail ] Found warnings/errors in server log f
created relay files in /var/run/mysqld/ which filled up the whole of the partition and caused errors in the logs. To repair the problem i ran {{{RESET MASTER}}} on the master db server and removed the relay files from the slave. This didn't have the desired affect. >Start slave; "Error reading slave log configuration" I then banged my head against the wall. A blog documented a similar problem whereby the files master.info and relay-bin.info were both empty. And to delete them Gung-Ho I deleted the following sudo rm /var/lib/mysql/relay-log.info sudo rm /var/lib/mysql/master.info sudo rm /var/runmysqld/* Restarted slave and everything was back to normal.... apart from the data loss. See Mysqldump and restore slave from master using bash Handling other Errors Error "ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log" I opened the syslog where the message said >sudo less /var/log/syslog [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000040' (relay_log_pos 202987) I opened up the relay-log.info file >sudo nano /var/lib/mysql/relay-log.info /var/run/mysqld/mysqld-relay-bin.000040 ... In the directory /var/run/mysqld/ and the mysql directory log file mysqld-relay-bin.index there were only three files mentioned, which did not include mysqld-relay-bin.000040. I deleted the the relay-log.info file sudo rm /var/lib/mysql/relay-log.info And restarted mysql slave successfully. Error: "Slave_IO_Running: No" I got this another day mysql> SHOW SLAVE STATUS\G ... Slave_IO_Running: No Slave_SQL_Running: Yes ... The log file defined in "my.cnf" err-log=/data/logs/mysqld/mysqld.log Looking in err-log=/data/logs/mysqld/mysqld.log contained the following lines. 080718 10:35:34 [Note] Slave I/O thread: connected to master 'replicateuser@1.2.3.4:3306', replication started in log 'db1-bin.000125' at position 920655371 080718 10:35:34 [ERROR] Error reading packet from server: log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master (server_errno=1236) 080718 10:35:34 [ERROR] Got fatal error 1236: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master' from master when reading data from binary log 080718 10:35:34 [ERROR] Slave I/O thread exiting, read up to log 'db1-bin.000125', position 920655371 It tells us what to do Update the mysql parameter on the master. So edit my.cnf with... max_allowed_packet=16M Edit Article Comments greatgreat information!Created 05/11/09willow315I am attempting to resolve an issue with mySQL timing o