search cancel

Mysql service not coming ibdata does not exist but ib_logfile0 exists

book

Article ID: 187940

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

Mysql service is not coming up on of the API Gateway boxes

 

We are getting below error in /var/log/mysqld.log 

 

2020-04-01T16:58:32.807700Z 0 [Note] InnoDB: The first innodb_system data file 'ibdata' did not exist. A new tablespace will be created!

2020-04-01T16:58:32.807754Z 0 [ERROR] InnoDB: redo log file './ib_logfile0' exists. Creating system tablespace with existing redo log files is not recommended. Please delete all redo log files before creating new system tablespace.

 

 

Environment

Release : 9.3

Component : API GATEWAY

Resolution

Someone deleted OR the ibdata file went corrupt.

**Special Note: Never delete ibdata on mysql 5.7 it will cause lots of error in the /var/log/mysqld.log in regards to tablespace failures.

But the error is that though ibdata was removed ib_log files still exist.

Please login to the gateway using ssgconfig

Choose option 3) Privileged shell

check 
# cd /var/lib/mysql
# ls -al | grep -i ib

If you see no ibdata file BUT see ib_log* (ib_logfile0 and/or ib_logfile1 )
Then mv them to /tmp
# mv ib_logfile0 /tmp/ib_logfile0
that should fix this error on mysql startup. 

# service mysql start