在端口 3306 上的 MAMP 上运行 MySQL 有什么好处?

发布于 2024-07-17 12:45:43 字数 738 浏览 2 评论 0原文

我在尝试在 Mac 上安装 MySQL 时遇到了很多问题,所以我屈服并安装了 MAMP。

MAMP 将其 Apache 和 MySQL 版本设置为使用端口 8888 和 8889。很多 MAMP 教程 (例如这个一) 提到您应该将 MAMP 的 Apache 和 MySQL 端口设置为默认值 80 和 3306,但他们没有提到原因(除了 http://localhost:8888/ 变为 http://localhost)。

Apache 和 MySQL 似乎使用 MAMP 的默认值启动良好,我可以让 Apache 在端口 80 下启动,但当我尝试将其设置为端口 3306 时,MySQL 不会启动。我认为这与幻像有关我尝试安装并废弃的MySQL安装(但我可能是错的)。

您是否预见到我可能正在运行 MySQL 的幻影实例这一事实会出现问题,或者这是一个单独的问题? 将 MySQL 设置为在 3306 下运行是否重要,还是应该将其保留在 8889 上并继续?

I've had a lot of problems trying to get MySQL installed on my Mac, so I caved and installed MAMP.

MAMP sets its versions of Apache and MySQL to use ports 8888 and 8889. A lot of the MAMP tutorials (such as this one) mention that you should set MAMP's Apache and MySQL ports to their defaults of 80 and 3306, but they don't mention why (besides http://localhost:8888/ becoming http://localhost).

Apache and MySQL seem to start fine using MAMP's defaults, and I am able to get Apache to start under port 80, but MySQL won't start when I try to set it to port 3306. I think this has something to do with a phantom installation of MySQL that I tried to install and scrapped (but I could be wrong).

Do you foresee problems with the fact that I may be running a phantom instance of MySQL, or is this a separate issue? Will it be important to set MySQL to run under 3306, or should I just leave it at 8889 and move on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巨坚强 2024-07-24 12:45:43

你可以把它保留在 8889 上。重要的是,在你的连接字符串中你指定新的 mysql 端口,这样 php 就会知道它必须连接到哪里

You can just leave it on 8889. Important thing is that in your connection string you specify new mysql port, so php will know where it has to connect

百思不得你姐 2024-07-24 12:45:43

任何服务器应用程序都可以在任何端口上运行。

警告是:

  1. 在端口上运行< 1024 要求您具有 root 权限
  2. 如果使用的端口是“非标准”,则客户端配置将需要更新。 在标准端口上运行通常允许省略端口字段
  3. SOHO 防火墙可能对可配置的自定义“服务”数量有限制,但通常有一个不错的已知服务列表

Any server application can run on any port.

The caveats are:

  1. Running on a port < 1024 requires that you have root privilege
  2. Client configuration will need updating if the port used is "non-standard". Running on the standard port normally allows the port field to be omitted
  3. SOHO Firewalls may have limits on the number of custom "services" that may be configured, but usually have a decent list of known services
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文