MySQL 不会在 XAMPP 服务器上启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17347053/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 18:01:13  来源:igfitidea点击:

MySQL won't start on XAMPP server

mysqlxampp

提问by user2372837

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

我的 XAMPP 服务器有问题。我可以毫无问题地启动 Apache、FileZilla 和其他所有东西,但是当我尝试启动 MySQL 时,它只是说

Attempting to start MySQL service...

正在尝试启动 MySQL 服务...

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

它永远保持这样,就像它被冻结了一样。

Any ideas how to fix it?

任何想法如何解决它?

回答by Andreas

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

检查 MySQL 的日志文件。您将在此目录中找到它们:C:\xampp\mysql\data(假设 xampp 的标准安装位置)

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

还要检查是否没有其他程序或服务使用默认的 MySql 端口。您可以使用以下命令执行此操作:

netstat -an | findstr "3306"

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

如果有任何显示,则默认 mysql 端口正在使用中。

回答by vpgodara

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"

我获取问题以启动 xampp 服务“mysqld.exe:Aria 恢复失败。请在所有 Aria 表上运行 aria_chk -r 并删除所有 aria_log.######## 文件”

I delete all area_log files form xampp\mysql\data

我从 xampp\mysql\data 中删除所有 area_log 文件

after that I restart XAMPP than it works.

之后,我重新启动 XAMPP 并使其正常工作。

Thanks

谢谢

回答by Dao Minh Duc

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

在 Windows 中,您应该去:开始 > 运行 > services.msc > Apache 2.4 > 属性 > 启动模式 > 自动 > 应用 > 开始 > 确定 > [与 MySQL 相同]

回答by Dheeraj Singh

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

我无法启动Mysqlxampp。错误信息是:-

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.

咏叹调恢复失败。请在所有 Aria 表上运行 aria_chk -r 并删除所有 aria_log.######## 文件。插件“Aria”初始化函数返回错误。插件“Aria”注册为存储引擎失败。插件“反馈”被禁用。Aria 引擎未启用或未启动。必须启用 Aria 引擎才能继续,因为 mysqld 是使用 --with-aria-tmp-tables 配置的。中止。

Just to go xampp/mysql/dataand delete or remove the file related to aria_logand restart your xamppserver. Worked fine for me.

只是去xampp/mysql/data删除或删除与aria_log您的xampp服务器相关的文件并重新启动。对我来说效果很好。

回答by user3140404

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

解决在活动监视器中停止 mysql 进程然后从 xampp UI 内重新启动 mysql 服务器的问题。

回答by Zangetsu

Perform

履行

which mysql.server

sudo path/to/mysql.server start

This should work on *nix OS

这应该适用于 *nix 操作系统

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

例如sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start对于 mac osx

回答by aug

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.

InnoDB: Error: could not open single-table tablespace file .\mysql\innodb_index_stats.ibd InnoDB: 我们不继续崩溃恢复,因为表可能会变成 InnoDB: 如果我们不能将 InnoDB 日志中的日志记录应用到它,它会损坏. InnoDB: 解决问题并启动mysqld: InnoDB: 1) 如果文件存在权限问题,mysqld 无法打开文件 InnoDB: 打开文件,修改权限。InnoDB:2)如果不需要该表,或者您可以从备份中恢复它,InnoDB:那么您可以删除 .ibd 文件,InnoDB 将执行正常的 InnoDB:崩溃恢复并忽略该表。InnoDB: 3) 如果文件系统或磁盘损坏,无法删除InnoDB:.ibd文件,可以在my.cnf中设置innodb_force_recovery > 0 InnoDB: 并强制InnoDB在这里继续崩溃恢复。

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

所以我所做的是我去了mysql文件夹并删除了该data1idb文件。之后它工作得很好。当我安装 Drupal 时,问题就开始了。

回答by Alex

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:

OP 没有提供足够的信息,但是这个(和其他错误)可能是由正在使用的默认 MySQL 端口 (3306) 引起的。如果是这种情况,您可以这样解决:

转到:

XAMPP Control Panel -> MySQL: "Config" button -> my.ini
将端口号从 3306 更改为不同的有效端口号。我刚刚使用了 3307。





您可以通过查看错误日志文件找到有关您的问题的更多信息。这是在这里找到:
XAMPP Control Panel -> MySQL: "Logs" button -> mysql_error.log

回答by Jake

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 )

在 xampp 文件夹中,您应该找到启动 mysql 批处理文件。运行它,防火墙可能会询问您是否允许它通过(因此请检查您的防火墙是否允许 mysqld.exe 通过)

回答by CantThinkOfAnything

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

运行位于 Xampp 根目录中的“setup_xampp.bat”文件对我有用。