64

I have an issue with MySQL. When I'm trying to start it, that gives me an error message, which is

2015-12-10 10:52:31 13f4 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-10 10:52:31 5108 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-10 10:52:31 5108 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-10 10:52:31 5108 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-10 10:52:31 5108 [Note] InnoDB: Memory barrier is not used
2015-12-10 10:52:31 5108 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-10 10:52:31 5108 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-10 10:52:31 5108 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-10 10:52:31 5108 [Note] InnoDB: Completed initialization of buffer pool
2015-12-10 10:52:31 5108 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-10 10:52:31 5108 [Note] InnoDB: The log sequence numbers 1902092 and 1902092 in ibdata files do not match the log sequence number 1902102 in the ib_logfiles!
2015-12-10 10:52:31 5108 [Note] InnoDB: Database was not shutdown normally!
2015-12-10 10:52:31 5108 [Note] InnoDB: Starting crash recovery.
2015-12-10 10:52:31 5108 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-10 10:52:31 5108 [Note] InnoDB: Restoring possible half-written data pages 
2015-12-10 10:52:31 5108 [Note] InnoDB: from the doublewrite buffer...
2015-12-10 10:52:31 5108 [Note] InnoDB: 128 rollback segment(s) are active.
2015-12-10 10:52:31 5108 [Note] InnoDB: Waiting for purge to start
2015-12-10 10:52:32 5108 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1902102
2015-12-10 10:52:32 1760 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-12-10 10:52:32 5108 [Note] Plugin 'FEEDBACK' is disabled.
2015-12-10 10:52:32 5108 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2015-12-10 10:52:32 5108 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2015-12-10 10:52:32 5108 [Note] Server socket created on IP: '::'.
2015-12-10 10:52:32 5108 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

I changed to InnoDB yesterday, but no problems were found. Any ideas?

3
  • What version of mysql (or percona)? Was this an upgrade? Or a fresh install? If upgrade, what was the previous version?
    – Rick James
    Commented Dec 11, 2015 at 20:07
  • I just installed XAMPP with PHP 5.6.15 and MariaDB 10.0.17.
    – dahegyi
    Commented Dec 15, 2015 at 15:27
  • I'm having trouble with selinux. journalctl -b -t setroubleshoot seems helpful for troubleshooting
    – Reed
    Commented Jul 18, 2023 at 17:11

15 Answers 15

91

These instructions worked for me in a fresh install of MariaDB in Arch Linux:

systemctl stop mariadb
rm -R /var/lib/mysql/*
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
systemctl start mariadb
4
  • 8
    FYI these have to be run with elevated privileges
    – kurdtpage
    Commented May 19, 2018 at 5:29
  • 18
    Please note that rm -R /var/lib/mysql/* will delete ALL database data. Commented Dec 9, 2020 at 10:06
  • 3
    And what if you already have some databases in /var/lib/mysql which is the default places for them ? These instructions just erase all databases ! Commented Nov 16, 2021 at 13:44
  • If the problem remains, the configuration in /etc/mysql or /etc/mysql/conf.d may be incorrect. I encountered the issue after using an invalid encryption key file (loose_file_key_management_filename), for example.
    – BurninLeo
    Commented Dec 28, 2022 at 19:48
91

removing (renaming) this files in /var/lib/mysql:

ib_logfile0
ib_logfile1
aria_log_control

and restarting:

sudo service mysql start

solved it for me

5
  • 14
    This worked in XAMPP windows. Commented Nov 23, 2021 at 11:53
  • 8
    also works for windows setup with xampp. Just got to xampp->mysql->data and locate and delete these files. Now restart xampp services and it should work fine. I had following error in mysql setup with xampp 3.2 2021-12-27 16:13:20 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded 2021-12-27 16:13:20 0 [ERROR] Failed to initialize plugins. 2021-12-27 16:13:20 0 [ERROR] Aborting
    – Ajinkya
    Commented Dec 27, 2021 at 10:53
  • 3
    This worked for me as well but can someone explain why this prevents the server from starting up properly?
    – ashkan117
    Commented Feb 7, 2022 at 18:56
  • 1
    On windows it is xampp\mysql\data Commented Jul 7, 2022 at 20:09
  • I deleted these three files and worked for me.
    – BH7
    Commented Apr 26 at 4:41
42

Simple solution:

There is a backup folder in the ..\Xampp\mysql directory. Copy its contents and paste in ..\Xampp\mysql\data. Then the error will be gone.

2
  • This works, wish I knew why :) Commented Oct 13, 2023 at 23:44
  • if you have already created databases please do backup them as they can get lost. Commented Apr 15 at 7:29
15

For the xampp users, you just need to replace following files from Xampp/mysql/backup folder to Xampp/mysql/data folder (FYI: Keep a backup copy of data folder before actioning just to be on a safer side..)

Image

15

For windows / xampp,

  1. Stop mysql service
  2. Go to mysql/data directory
  3. Please take the backup of highlighted file in separate place and then delete it from data directory.

enter image description here

  1. Start Mysql service.

The above method solved the problem for me.

1
  • This is safe solution as with other solutions databases can be lost if there are any in data folder. Commented Apr 15 at 7:28
4

For Windows this worked for me Perfectly:

Close your xammp completely using Task Manager

removing these files in /xampp/mysql:

ib_logfile0
ib_logfile1
aria_log_control
aria_log.* ( * == some Number)

Start again your xampp.

1

Just renamed these files and the issue fixed. After rename files next restart of mysql it will automatically create new files so no need to copy files from backup folder. enter image description here

1
  • No need to worry about data loss
    – Gopu R
    Commented Jan 18, 2023 at 4:02
0

I had this same FEEDBACK/plugins error using MariaDB 10.4 in Docker. Switching to MariaDB 10.3 solved it.

1
  • This does not explain why switching to 10.3 fixed it.
    – ekydfejj
    Commented Mar 29, 2020 at 3:16
0

From me it was /usr/bin/mariadbd process stock into the memory I was only manage to stop it with

sudo killall mariadbd
0

For my Windows XAMPP install, copying the files from the backup directory did clear the mysql error. However, it also reset my Wordpress install. I suspect that the underlying issue was a database corruption issue caused by the "bleeding edge" install of Wordpress on my local PC.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Dec 25, 2022 at 10:02
0
mv /var/lib/mysql/aria_log_control /var/lib/mysql/aria_log_control.orig 

this worked for me

from https://support.plesk.com/hc/en-us/articles/12377243101591-MariaDB-fails-to-start-Aria-engine-is-not-enabled-or-did-not-start

1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Chenmunka
    Commented Jul 24, 2023 at 9:37
0

I have same problem too, I tried some solution that you told before but doesn't work. I tried replace one by one the tables/files in data/mysql with the new one (I got it from backup) and.. the problem solved when I replace db.* files.

So my MariaDb running again after I replace files db.frm, db.MAD, and db.MAI.

3
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 4, 2023 at 8:02
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review
    – Yogendra
    Commented Sep 6, 2023 at 5:21
  • Seems like a sensible suggestion. I will try this.
    – UllerUller
    Commented Mar 6 at 6:31
0

The suggestion by Mohit Verma works ...

For windows / xampp,

Stop mysql service Go to mysql/data directory Please take the backup of highlighted file in separate place and then delete it from data directory. ![][1]

Start Mysql service.

1
  • Yes, this worked for me. But I have to do it on every start up. Does anybody have a permanent solution.
    – UllerUller
    Commented Mar 6 at 6:28
0

I had the same error shown but I found a different solution. I found that my backup had a mysql database and my current data didn't have that. I placed back the mysql database and my database worked just fine again.

0

So... in my particular case i had a quite old installation (10.3.31) of MariaDB on my Raspberry PI. One day, my system collapsed and I couldn't boot it up anymore so I had to make a copy of files from the SD card and move them to my new server instance. Even though my setup was very similar and I was getting the same exact error, I couldn't resolve it by applying the solutions proposed here.

What helped was:

  1. Installing the exact same version of MariaDB from the manufacturer site.
  2. Replacing all the contents of data dir with the old contents from the old machine.
  3. running MariaDB in safe mode using mysqld_safe from the bin dir.

If your database files sit in another directory you might want to use the --datadir parameter like so:

# mysqld_safe --datadir=/var/lib/mysql/

Finally, from there I was able to dump the files to a .sql dump.

# mysqldump database -u root -p > dump.sql

Not the answer you're looking for? Browse other questions tagged or ask your own question.