54

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?

Radek Postołowicz
  • 4,506
  • 2
  • 30
  • 47
dahegyi
  • 541
  • 1
  • 4
  • 3

12 Answers12

88

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
Das_Geek
  • 2,775
  • 7
  • 20
  • 26
Ivan
  • 1,265
  • 11
  • 20
  • 8
    FYI these have to be run with elevated privileges – kurdtpage May 19 '18 at 05:29
  • 13
    Please note that `rm -R /var/lib/mysql/*` will delete ALL database data. – Artem Molotov Dec 09 '20 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 ! – Pierre-Gilles Levallois Nov 16 '21 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 Dec 28 '22 at 19:48
64

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

Isaiahiroko
  • 994
  • 7
  • 12
  • 9
    This worked in XAMPP windows. – Tanmay Dwivedi Nov 23 '21 at 11:53
  • 5
    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 Dec 27 '21 at 10:53
  • 2
    This worked for me as well but can someone explain why this prevents the server from starting up properly? – ashkan117 Feb 07 '22 at 18:56
  • On windows it is xampp\mysql\data – Axazexz player Jul 07 '22 at 20:09
  • @Ajinkya Worked like magic. Thanks. – smartrahat May 17 '23 at 18:55
28

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.

FahimFBA
  • 27
  • 6
C.F.G
  • 817
  • 8
  • 16
10

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

user16217248
  • 3,119
  • 19
  • 19
  • 37
Pradip Parmar
  • 131
  • 1
  • 3
5

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.

Mohit Verma
  • 153
  • 2
  • 5
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.

Abdul Rehman
  • 142
  • 1
  • 12
0

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

UserX
  • 485
  • 5
  • 12
0

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

sudo killall mariadbd
Salem
  • 654
  • 7
  • 24
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.

  • 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](/help/how-to-answer). – Community Dec 25 '22 at 10:02
0

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

Gopu R
  • 21
  • 2
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

z2ouu
  • 41
  • 1
  • 10
  • 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](/review/late-answers/34713025) – Chenmunka Jul 24 '23 at 09: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.