Question

[Solved] Getting error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed” when starting MySQL

I found many similar question on Stackoverflow but didn’t get the exact error solution.
My issue is when starting MySQL service on one of the Dedicated Centos 6.5 machine, I am getting error :

141018 05:13:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141018  5:13:47 [Warning] Can't create test file /var/lib/mysql/ip-184-168-73-83.lower-test
141018  5:13:47 [Warning] Can't create test file /var/lib/mysql/ip-184-168-73-83.lower-test
/usr/libexec/mysqld: Can't create/write to file '/tmp/ibkTWnhE' (Errcode: 28)
141018  5:13:48  InnoDB: Error: unable to create temporary file; errno: 28
141018  5:13:48 [ERROR] Plugin 'InnoDB' init function returned error.
141018  5:13:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141018  5:13:48 [ERROR] Can't start server : Bind on unix socket: No space left on device
141018  5:13:48 [ERROR] Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ?
141018  5:13:48 [ERROR] Aborting

141018  5:13:48 [Note] /usr/libexec/mysqld: Shutdown complete

141018 05:13:48 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Here are free command status:
free -m

             total       used       free     shared    buffers     cached
Mem:          3743       3631        111          0       2705         21
-/+ buffers/cache:        905       2838
Swap:         2047          0       2047

Solution #1:

I have the same problems, this my solution:

  1. Add more RAM to the server

  2. Decrease the value of innodb-buffer-pool size in the config file:

    sudo nano /etc/mysql/my.cnf

    innodb_buffer_pool_size = 10M
    

After save /etc/mysql/my.cnf.

Restart mysql service:

sudo service mysql restart

exit
Respondent: xuri

Solution #2:

This is frequently occurred issue. Do following –

  1. delete/move out these “aria_log_contro, ib_logfile0, ib_logfile1, ib_data1” files from location “..xamppmysqldata” and also from “..xamppmysqlackup”.
  2. stop and start apache server and mysql form xampp control panel

This should fix the issue; actually it worked for me.

Respondent: Avinash Thombre

Solution #3:

Changing the values of innodb_buffer_pool_size and innodb_log_file_size didn’t work for me.

Moving ib_logfile0 and ib_logfile1 files didn’t help either.

What did help was:

> service mysql stop

Edit my.cfg and add innodb_force_recovery = 1

> service mysql start
> service mysql stop

Comment the innodb_force_recovery = 1 line.

> service mysql start

And voilá. (I should note that I have no idea if this involves any data loss or not)

Respondent: Petr Nagy

Solution #4:

I fixed this issue by following:

  • Login to server via SSH with root access.
  • Navigate to /var/lib/mysql.
  • If you see log files like, ib_logfile0 and ib_logfile1, rename or move them to some other folder.
  • Stop and start the MySQL service by running sudo service mysql stop and sudo service mysql start

I hope this helps. Thanks

Respondent: Minhaj Javed

Solution #5:

I was getting below mysql error log:-

[Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
InnoDB: Completed initialization of buffer pool
InnoDB: Fatal error: cannot allocate memory for the buffer pool
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
[Note] /usr/libexec/mysqld: Shutdown complete

I found out there are two solutions which are:-

1)Set innodb_log_file_size equal to the actual size of the existing InnoDB log files.
To see what size of innoDB log allocated, login mysql and enter following cmd:-

SHOW GLOBAL VARIABLES LIKE 'innodb_log_file_size';

Expected result example:- 5242880

After that, insert that value in my.cnf:-
vi /etc/my.cnf

 innodb_log_file_size =5242880

2)Rename or move both the ./ib_logfile0 and ./ib_logfile1 files, and then start the MySQL server.This normally will be located at /var/lib/mysql. After start mysql, it create new innoDB log file and restore possible half-written data from the file of .ibd.

The expexted mysql log example:-

InnoDB: Database physically writes the file full: wait...
161216  9:58:54  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
161216  9:58:54 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
161216  9:58:54  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
161216  9:58:54  InnoDB: Waiting for the background threads to start
161216  9:58:55 InnoDB: 5.5.50 started; log sequence number 1589772
161216  9:58:55 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
161216  9:58:55 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
161216  9:58:55 [Note] Server socket created on IP: '0.0.0.0'.
161216  9:58:55 [Note] Event Scheduler: Loaded 0 events
161216  9:58:55 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.50'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi

References:-
JUSTIN KULESZA (2011). MySQL: Failed Registration of InnoDB as a Storage Engine. Available at: https://spin.atomicobject.com/2011/05/09/mysql-failed-registration-of-innodb-as-a-storage-engine/.

RolandoMySQLDBA (2014). MySQL my.cnf: innodb_log_file_size is missing. Available at: https://dba.stackexchange.com/questions/75688/mysql-my-cnf-innodb-log-file-size-is-missing/158325#158325

Changing the Number or Size of InnoDB Redo Log Files. Available at: http://dev.mysql.com/doc/refman/5.7/en/innodb-data-log-reconfiguration.html

Respondent: user3871474

Solution #6:

Although late but putting answer here so that solution that helped me can help someone. I took following steps:

  1. Added more RAM to sever
  2. Decrease the value of innodb-buffer-pool size
  3. Set innodb_log_file_size
  4. Restart mysql

Example of addition to my.cnf:

innodb_buffer_pool_size = 10M
innodb_log_file_size = 1000M
Respondent: Ritesh Kumar

Solution #7:

Nothing was working with reinstalls, removes, and others (I had no data to keep, not a fix; more of a data destruction process, big caveat there):

1005  mysql_install_db
1007  /usr/bin/mysqld_safe --datadir="/var/lib/mysql
1008  /usr/bin/mysqld_safe --datadir="/var/lib/mysql' (^z)
1009  bg
1010  mysql
1011  mysql_secure_installation
1012  mysql
1013  mysql -p

And viola; actually usable database.

Respondent: John Greenfelder

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy