26

These were the logs:

[ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files [ERROR] Plugin 'Aria' init function returned error. [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.

Darth Veyda
  • 828
  • 2
  • 12
  • 23
German Alfonso
  • 1,281
  • 1
  • 9
  • 8

5 Answers5

92

The solution is Removing the aria_log_control file allowed MariaDB to start again. You can find this file in \xampp\mysql\data. Then restart or start xammp.

DINA TAKLIT
  • 7,074
  • 10
  • 69
  • 74
German Alfonso
  • 1,281
  • 1
  • 9
  • 8
  • 2
    why happend this? – Oscar Dec 22 '17 at 11:16
  • 3
    This works! Thanks! But why this is happening suddenly?? – Avinash Jan 22 '18 at 04:58
  • 1
    It's worked for me and what's the permanent solution for this issue. – Mahendra Jella Mar 01 '18 at 05:07
  • 4
    +1 worked for me, in my case the file i renamed was `aria_log.00000001` and upon relaunch there was another file created immediately with prefix `.00000002` . still would be great to know what causes it – Obmerk Kronen Apr 24 '18 at 15:23
  • This worked from my end also. I wonder what is causing this issue. But thanks for the solution! – MazeStricks Jul 05 '18 at 08:46
  • just wondered, is it a bug in xampp when use it for long time and log stack up cause the error. – Võ Minh Jan 24 '19 at 12:42
  • @ObmerkKronen,@MazeStricks i have faced same issue, so in my case probably it happened because i have opened xampp multiple times, i am not sure it happened because of that but maybe running xampp multiple time can be cause of that. – Haritsinh Gohil May 17 '19 at 07:20
  • @HaritsinhGohil . thiss should not be a problem because the the UI is just a UI, it just verify the services / ports and gives you buttons to open / stop. YOu can open 3 GUI's ( at least I did ) and nothing should change. – Obmerk Kronen May 17 '19 at 13:06
  • Yes, @ObmerkKronen, its just UI, But UI is the way to start a process, for e.g. if you have opened xampp two times then localhost will not work , you have to quit from both of them , then you have to start it again to run localhost, **in my case** i have auto start apache and mysql services on opening of xampp. but if you dont have `auto-start` services then it will not be a problem to open it multiple times. – Haritsinh Gohil May 20 '19 at 05:24
  • @HaritsinhGohil . if the problem is that you have double services then just delete ( or just uncheck them in the ui - never tried myself but I imagine should work ) but as far as the original solution - it did work for me several times. – Obmerk Kronen May 20 '19 at 06:26
  • @ObmerkKronen , the above solution also worked for me but i am only saying that because of running double services can be the cause of this unexpected shutdown. – Haritsinh Gohil May 20 '19 at 06:51
  • how would that be on ampps? –  Jun 18 '20 at 15:16
  • @German Alfonso Thanks a bunch! It resolved my issue. – Zobia Kanwal Dec 11 '21 at 14:20
  • This didn't work for me. The aria error disappeared but my database remained defect. The message in the Xampp console remained the same. There was only a difference in the messages in the mysql_error.log file. – user2587656 Feb 02 '22 at 16:48
8

Aria is database storage engine. It is specific for MariaDb and a variation on MyIsam. Usually it is only used for the Mysql database. But as that is the system database that stores the properties of the system it is crucial.

Aria has its own check-and-repair tool aria_chk. So what this error message is asking you is to go to the mysql/data directory and to run

 ../bin/aria_chk -r mysql/*.mai

Don't go to a lower or higher directory level as the file aria_log_control is used and must be present in the active directory.

However, don't run to use this tool. I never succeeded to fix my database this way. What worked once was just waiting.

When I used Xampp with PHP 5 it was rock solid. But when I switched to PHP 7.x versions I repeatedly saw my database go up in smoke due to this aria error. Typically after a Windows upgrade my database would refuse to restart. I now try to remember to explicitly shut down MariaDb before I shut down Windows but it still doesn't help.

One possibly structural solution was mentioned in an answer to another Stackoverflow question: increase some settings in my.ini (or my.cnf): innodb_buffer_pool_size and innodb_data_file_path.

What certainly need to be done is that Mysql is run as a service. only then will it correctly close when Windows is shut down. This can only be done when xampp-control.exe is started with administrator rights. See also the Xampp forum.

I have different versions of Xampp installed. One time I was working under PHP 5 and I needed to have something done under PHP 7.4. So I stut down Apache and MariaDb of the PHP 5 version. Then I waited some half hour - doing other things. Then I started the PHP 7.4 versions of the programs. I got the feared aria error. I closed Apache and worked for some more hours on other things. Then I rebooted my computer. Again I spent some hours doing other things. And when I then started PHP 7.4 Apache and MariaDb they worked ok.

My advice is to run it first without the -r flag to see which tables are broken. There is also an option -o for recovery old style. According to the manual it is slower than -r but covers more problems. There are other options such as -e. See the Mariadb website for a complete list.

If you use just "" (star) instead of ".mai" (star dot mai) you will get messages that .frm and .mad files are not useable files. [stackoverflow refuses to show single stars]

When you call mysqlcheck aria_chk is called too. But aria_chk can run when Mysql is down while it needs to be running for mysqlcheck.

Unfortunately in my case neither of the solutions worked. Both seemed to truncate the db table and both resulted in a situation where you can start the database but it is impossible to login.

So: make a backup of your mysql/data directory. You may need to experiment.

user2587656
  • 309
  • 3
  • 5
  • As mentioned I have not been lucky deleting control files. What worked for me instead was creating a new installation and copying the .frm, .ibd, .myi and .myd files and ib_logfiles and ibdata there. See also https://stackoverflow.com/questions/10934745/restore-the-mysql-database-from-frm-files – user2587656 Jul 17 '23 at 07:49
4

Try this...

  1. Stop MySQL Services
  2. Stop you apache Services
  3. Delete aria_log_control ( Check this location -> pc/c drive / xampp folder / MySQL folder / data folder / aria_log_control )
  4. Exit from the all folders
  5. Open xampp
  6. Start Apache Services& MySQL Service
Jack D
  • 109
  • 7
3

In mysql_error.log I had also the same error :

"2022-06-29 9:05:00 0 [ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files"

From Command Prompt on Windows, I went to:

C:\xampp\mysql\data And I run : C:\xampp\mysql\bin\aria_chk.exe -r mysql/*.mai (thanks user2587656)

Then I delete aria_log.00000001 and aria_log_control.

I stop and start apache and start MySQL : it worked.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
Anne P
  • 41
  • 2
0

If XAMPP generated following logs

[Note] Plugin 'FEEDBACK' is disabled.

[ERROR] j:\xampp\mysql\bin\mysqld.exe: unknown option '--skip-federated'

[ERROR] Aborting

Try to run MySQL with the following command

**mysqld.exe --skip-federated**

Hope this helps!! Good Luck!!

Piyush Bansal
  • 1,635
  • 4
  • 16
  • 39