无法在 XAMPP 中启动 MySQL?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15490913/
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
Can't start MySQL in XAMPP?
提问by Travis Nabbefeld
So I was trying to use this login system I made and it started giving me weird errors. I figured out that it was because MySQL wasn't started. So I tried to start it, but it wouldn't. Here is the log:
所以我试图使用我制作的这个登录系统,它开始给我一些奇怪的错误。我发现这是因为 MySQL 没有启动。所以我试图启动它,但它不会。这是日志:
10:06:12 PM [mysql] Attempting to start MySQL app...
10:06:12 PM [mysql] Status change detected: running
10:06:13 PM [mysql] Status change detected: stopped
10:06:13 PM [mysql] Error: MySQL shutdown unexpectedly.
10:06:13 PM [mysql] This may be due to a blocked port, missing dependencies,
10:06:13 PM [mysql] improper privileges, a crash, or a shutdown by another method
10:06:13 PM [mysql] Check the "/xampp/mysql/data/mysql_error.log" file
10:06:13 PM [mysql] and the Windows Event Viewer for more clues
And here is some of the more notable lines in the error log (mysql_error.log):
以下是错误日志 (mysql_error.log) 中一些更值得注意的行:
130318 22:06:12 InnoDB: Database was not shut down normally!
130318 22:06:12 InnoDB: Waiting for the background threads to start
130318 22:06:13 InnoDB: 1.1.8 started; log sequence number 1599518
130318 22:06:13 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130318 22:06:13 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130318 22:06:13 [Note] Server socket created on IP: '0.0.0.0'.
130318 22:06:13 [ERROR] Fatal error: Can't open and lock privilege tables: Can't
find file: 'host' (errno: 2)
Can these errors be fixed without reinstalling XAMPP?
可以在不重新安装 XAMPP 的情况下修复这些错误吗?
回答by Sammie
Opening the XAMPP Control Panel in Administrator mode and uninstalling the MySQL service and then reinstalling it back again worked for me. To do that, check and uncheck the circled checkbox in the provided snapshot. Here is the picture...
在管理员模式下打开 XAMPP 控制面板并卸载 MySQL 服务,然后重新安装它对我有用。为此,请选中并取消选中提供的快照中带圆圈的复选框。这是图片...
回答by chathun
Stop another Mysql server in Your computer. You can show it open TaskManager Stop or remove another servers and restart xammp
在您的计算机中停止另一个 Mysql 服务器。您可以显示它打开 TaskManager 停止或删除其他服务器并重新启动 xammp
回答by Travis Nabbefeld
I just reinstalled it and kept the htdocs folder.
我刚刚重新安装了它并保留了 htdocs 文件夹。
回答by user2741542
I was getting the same error but checking services showed a mysql service running so I stopped it and now it's working. I did this through the XAMPP Control Panel running as Administrator and getting to services from there.
我遇到了同样的错误,但检查服务显示 mysql 服务正在运行,所以我停止了它,现在它正在工作。我通过以管理员身份运行的 XAMPP 控制面板并从那里获取服务来做到这一点。