MysQL Binlog got deleted..

Currently been busy with doing some migration stuff from MySQL to NuoDB.

Since my binlog directory is almost full, decided to delete its content.
no issue on my database while its running but when i restarted my database got below error.

2017-01-13 14:57:09 21617 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-01-13 14:57:09 21617 [Note] InnoDB: The InnoDB memory heap is disabled
2017-01-13 14:57:09 21617 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-01-13 14:57:09 21617 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-01-13 14:57:09 21617 [Note] InnoDB: Using Linux native AIO
2017-01-13 14:57:09 21617 [Note] InnoDB: Using CPU crc32 instructions
2017-01-13 14:57:09 21617 [Note] InnoDB: Initializing buffer pool, size = 2.0G
2017-01-13 14:57:09 21617 [Note] InnoDB: Completed initialization of buffer pool
2017-01-13 14:57:09 21617 [Note] InnoDB: Highest supported file format is Barracuda.
2017-01-13 14:57:10 21617 [Note] InnoDB: 128 rollback segment(s) are active.
2017-01-13 14:57:10 21617 [Note] InnoDB: Waiting for purge to start
2017-01-13 14:57:10 21617 [Note] InnoDB: 5.6.18 started; log sequence number 45305320390
/usr/sbin/mysqld: File '/mysqldb_binlog/master-bin.000250' not found (Errcode: 2 - No such file or directory)
2017-01-13 14:57:10 21617 [ERROR] Failed to open log (file '/mysqldb_binlog/master-bin.000250', errno 2)
2017-01-13 14:57:10 21617 [ERROR] Could not open log file
2017-01-13 14:57:10 21617 [ERROR] Can't init tc log
2017-01-13 14:57:10 21617 [ERROR] Aborting

To fix the issue, renamed the /mysqldb_binlog/master-bin.index to some other name or delete it 🙂

[root@lnxmysqlnpx mysqldb_tranlog]#  mv /mysqldb_binlog/master-bin.index /mysqldb_binlog/master-bin.indexbak

Now lets start the database.

[root@lnxmysqlnpx mysqldb_tranlog]# service mysql start
Starting MySQL.. SUCCESS!
[root@lnxmysqlnpx mysqldb_tranlog]#

[root@lnxmysqlnpx mysqldb_tranlog]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.18-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Thanks!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s