MySQL won't start on XAMPP server

北城余情 提交于 2019-12-10 03:45:20

问题


I have a problem with my XAMPP server. I can start Apache, FileZilla, and every thing else without problems, but when I try to start MySQL, it just says

Attempting to start MySQL service...

and it stays like that forever, like if it was frozen or something.

Any ideas how to fix it?


回答1:


Check the log files for MySQL. You will find them in this directory: C:\xampp\mysql\data (assuming standard install location of xampp)

Also check if no other program or service uses the default MySql port. You can do this by using this command:

netstat -an | findstr "3306"

If anything shows up the default mysql port is in use.




回答2:


In Windows, you should go: Start > Run > services.msc > Apache 2.4 > Properties > Start Mode > Automatic > Apply > Start > OK > [Same as MySQL]




回答3:


Resolve the issue stopping the mysql process in the activity monitor and then restarting the mysql server from within the xampp UI.




回答4:


I fetch the problem to start xampp services "mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files"

I delete all area_log files form xampp\mysql\data

after that I restart XAMPP than it works.

Thanks




回答5:


I was not able to start Mysql on xampp. Error message was:-

Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files. Plugin 'Aria' init function returned error. Plugin 'Aria' registration as a STORAGE ENGINE failed. Plugin 'FEEDBACK' is disabled. Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables. Aborting.

Just to go xampp/mysql/data and delete or remove the file related to aria_log and restart your xampp server. Worked fine for me.




回答6:


Go to the error log and check. For me I got this error message:

InnoDB: Error: could not open single-table tablespace file .\mysql\innodb_index_stats.ibd InnoDB: We do not continue the crash recovery, because the table may become InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it. InnoDB: To fix the problem and start mysqld: InnoDB: 1) If there is a permission problem in the file and mysqld cannot InnoDB: open the file, you should modify the permissions. InnoDB: 2) If the table is not needed, or you can restore it from a backup, InnoDB: then you can remove the .ibd file, and InnoDB will do a normal InnoDB: crash recovery and ignore that table. InnoDB: 3) If the file system or the disk is broken, and you cannot remove InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf InnoDB: and force InnoDB to continue crash recovery here.

So what I did was I went to the mysql folder and deleted the data1idb file. After that it worked fine. The problem started when I installed Drupal.




回答7:


Perform

which mysql.server

sudo path/to/mysql.server start

This should work on *nix OS

eg sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start for mac osx




回答8:


In The xampp folder you should find the start mysql batch file. Run it, The firewall might ask if you want to allow it through ( So check your firewall if it lets mysqld.exe through )




回答9:


OP did not provide enough information, however this (and other errors) can be caused by the default MySQL port (3306) being used. If this is the case, you can solve it like this:

Go to:

XAMPP Control Panel -> MySQL: "Config" button -> my.ini
Change the port number from 3306 to a different valid port number. I just used 3307.

You can find out more information about your problem by looking at the error log file. This is found here:
XAMPP Control Panel -> MySQL: "Logs" button -> mysql_error.log



回答10:


Running the "setup_xampp.bat" file located in the root directory of Xampp did the trick for me.




回答11:


Though this is late, I'm sure it would help someone in future.

  1. First run which mysql.server to know where mysql is located on your machine. After then run sudo /usr/local/bin/mysql.server stopto be sure that no other mysql process is running. If no other process is running, you would definitely get an error saying MySQL server PID file could not be found!. That's fine.

  2. After then run sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start to start Xampp's mysql server. When you go to the Xampp GUI, you should see that mysql status as running.

Please note that this is for OS X users.



来源:https://stackoverflow.com/questions/17347053/mysql-wont-start-on-xampp-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!