Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown/unsupported storage engine: InnoDB

I'm setting up a replication server and when I try to start the mysql service for the first time, it fails:

[root@ravioli mysql]# service mysqld start
MySQL Daemon failed to start.
Starting mysqld:                                           [FAILED]
[root@ravioli mysql]# tail /var/log/mysqld.log 
151013 13:41:27 [ERROR] Plugin 'InnoDB' init function returned error.
151013 13:41:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
/usr/libexec/mysqld: File '/databases/mysql/mysql_slow_queries.log' not found (Errcode: 13)
151013 13:41:27 [ERROR] Could not use /databases/mysql/mysql_slow_queries.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
151013 13:41:27 [ERROR] Unknown/unsupported storage engine: InnoDB
151013 13:41:27 [ERROR] Aborting

151013 13:41:27 [Note] /usr/libexec/mysqld: Shutdown complete

151013 13:41:27 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

I confirmed that user mysql sees and is able to write to /databases/mysql/mysql_slow_queries.log.

Then I checked getenforce and see it is set to Enforcing.

How do I configure MySQL to play nicely with SELinux?

like image 726
a coder Avatar asked Oct 13 '15 17:10

a coder


2 Answers

All I needed was to delete two files which are:

ib_logfile0

and

ib_logfile1

Then going back to start mysql everything worked

like image 132
Christopher Kikoti Avatar answered Sep 20 '22 17:09

Christopher Kikoti


This resolved my problem

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1

sudo apt-get install mysql-server
like image 24
Anders B Avatar answered Sep 19 '22 17:09

Anders B