【发布时间】:2015-11-17 08:12:22
【问题描述】:
我使用 XAMPP/Apache 已经有一段时间了,最近决定安装 MySQL。然而,它们似乎是矛盾的。 MySQL 似乎优先考虑,并且它运行正常,但是 XAMPP/Apache 在尝试启动 Apache 时给了我这个错误消息:
03:07:32 AM [Apache] Attempting to start Apache app...
03:07:33 AM [Apache] Status change detected: running
03:07:33 AM [Apache] Status change detected: stopped
03:07:33 AM [Apache] Error: Apache shutdown unexpectedly.
03:07:33 AM [Apache] This may be due to a blocked port, missing dependencies,
03:07:33 AM [Apache] improper privileges, a crash, or a shutdown by another method.
03:07:33 AM [Apache] Press the Logs button to view error logs and check
03:07:33 AM [Apache] the Windows Event Viewer for more clues
03:07:33 AM [Apache] If you need more help, copy and post this
03:07:33 AM [Apache] entire log window on the forums
我尝试按照此处的说明进行操作: http://www.complete-concrete-concise.com/web-tools/how-to-change-the-apache-port-in-xampp
我已经尝试更改文档:xampp/apache/conf 中的 httpd.conf
将“Listen 80”更改为各种内容,重新启动应用程序后出现相同的错误消息。
非常感谢您在此问题上的任何帮助。我不希望仅仅为了使用 XAMPP 而删除 mySQL,但如果它们无法同时运行,我会这样做。
提前致谢。
编辑:
我认为它与 MySQL 冲突的原因是:
03:26:51 AM [mysql] Problem detected!
03:26:51 AM [mysql] Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"!
03:26:51 AM [mysql] MySQL WILL NOT start without the configured ports free!
03:26:51 AM [mysql] You need to uninstall/disable/reconfigure the blocking application
03:26:51 AM [mysql] or reconfigure MySQL and the Control Panel to listen on a different port
我在暂时禁用 mySQL 以使用 XAMPP/Apache 时遇到了一些困难。 有什么办法可以改变端口,让它们可以共存?
编辑 2:
尝试按照此处的说明进行操作: http://silentlyrun.blogspot.com.au/2013/02/how-to-change-apache-n-mysql-port-for.html
我遇到这些错误消息后:
09:13:22 AM [main] Initializing Modules
09:13:22 AM [Apache] Problem detected!
09:13:22 AM [Apache] Port 80 in use by "Unable to open process" with PID 4084!
09:13:22 AM [Apache] Apache WILL NOT start without the configured ports free!
09:13:22 AM [Apache] You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
09:13:22 AM [Apache] Problem detected!
09:13:22 AM [Apache] Port 443 in use by "Unable to open process" with PID 4084!
09:13:22 AM [Apache] Apache WILL NOT start without the configured ports free!
09:13:22 AM [Apache] You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM [Apache] or reconfigure Apache and the Control Panel to listen on a different port
根据这些说明,新端口应该相同吗?我假设是因为他们都是 80 岁。
4. Search the string "Listen" in the file.
5. Replace port number 80 to any other unused port number.
6. Search for "ServerName" in the file.
7. Replace port number 80 to any other unused port number in the ServerName.
编辑 3:
由于我不知道的原因,XAMPP/MySQL 在从上面的silentlyrun.blogspot 链接重新安装和端口更改后可以正常工作。 但是 XAMPP/Apache 仍然存在问题:
09:32:14 AM [Apache] Error: Apache shutdown unexpectedly.
09:32:14 AM [Apache] This may be due to a blocked port, missing dependencies,
09:32:14 AM [Apache] improper privileges, a crash, or a shutdown by another method.
09:32:14 AM [Apache] Press the Logs button to view error logs and check
09:32:14 AM [Apache] the Windows Event Viewer for more clues
09:32:14 AM [Apache] If you need more help, copy and post this
09:32:14 AM [Apache] entire log window on the forums
【问题讨论】:
-
我认为您已经打开了与您的 XAMPP 相同端口的其他应用程序。你的Skype打开了吗?
-
感谢您的回复。不,我没有打开 Skype,我已经关闭了所有非必要的应用程序,当我尝试重新启动应用程序时,它仍然给出第一次提到的错误。即使通过任务管理器关闭 MySQL,我仍然会遇到这个问题。无论如何,感谢您的帮助。
-
XAMPP 自带了自己的 mysql 安装,这就是为什么您会收到“正在使用的端口 3306”错误。
-
您能否简单地尝试以管理员身份运行它,看看是否能解决问题?通常任何端口