尝试打开 localhost 时,它会进入错误页面。 (xampp)

Posted

技术标签:

【中文标题】尝试打开 localhost 时,它会进入错误页面。 (xampp)【英文标题】:When trying to open localhost it goes to error page. (xampp) 【发布时间】:2015-02-25 11:37:53 【问题描述】:

我尝试打开 localhost,但是当我在 xampp 的控制面板中打开时,服务关闭并打印错误:

11:18:37 [mysql] 错误:MySQL 意外关闭。

11:18:37 [mysql] 这可能是由于端口阻塞,丢失 依赖关系,

11:18:37 [mysql] 权限不当、崩溃或关闭 另一种方法。

11:18:37 [mysql] 按Logs按钮查看错误日志并检查

11:18:37 [mysql] Windows 事件查看器获取更多线索

11:18:37 [mysql] 如果您需要更多帮助,请复制并发布此内容

11:18:37 [mysql] 论坛上的整个日志窗口

然后我尝试再次启动它,它说它正在工作,但是当我刷新本地主机上的错误页面时,SQL 再次停止工作。我已将 Skype 上的端口更改为 80 以外的端口,如果有帮助的话。

【问题讨论】:

不,它再次关闭并停止本地主机。 有时我可以访问 localhost 的可视页面,但是应该在其中工作的所有内容都没有。无法访问表、数据库等。当我可以看到 localhost 时,MySQL 从 xampp 关闭并打印相同的错误。 【参考方案1】:

你有两种方法可以做到。

1) 如果您正在使用Skype,请退出它。

2) 验证Skype正在使用的端口号。如果与Mysql端口相同,请从其配置文件中更改Mysql端口号。

要更改它,请按照以下步骤操作:

1. Stop the xampp server, if it is already running.
2. Go to folder "C:\xampp\apache\conf". (By default apache is installed in C folder)
3. Open the file httpd.conf.
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.
8. Save the httpd.conf.
9. Start the xampp server.

【讨论】:

我非常耐心地到达了 localhost 页面,但 MySQL 再次停止工作。

以上是关于尝试打开 localhost 时,它会进入错误页面。 (xampp)的主要内容,如果未能解决你的问题,请参考以下文章

尝试向URI http:// localhost:XXXXX / XXXX发出请求时发生错误

XAMPP,PHP:尝试打开 localhost/tests/test.php 时页面为空

所有通过 WAMP 的 localhost 页面都被阻止了吗?

当我浏览 http://localhost:8004/elmah.axd 时,它会生成 404 错误

Xcode 11 beta 和 Mac OS Mojave:当我尝试创建一个新项目和/或打开现有项目时,它会因错误而关闭

localhost 拒绝连接 Xampp 问题