How to fix Error: MySQL shutdown unexpectedly on Xampp due to Plugin 'Aria'

ykejflvf  于 2022-12-22  发布在  Mysql
关注(0)|答案(5)|浏览(146)

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.

uttx8gqw

uttx8gqw1#

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 .

drkbr07n

drkbr07n2#

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.

6pp0gazn

6pp0gazn3#

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
2w2cym1i

2w2cym1i4#

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!!

cotxawn7

cotxawn75#

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.

相关问题