[英]MAMP Unable to Connect to MySQL on localhost (10061) - 2017
I'm trying to create a dynamic drop down list by requesting data from my database using MAMP.我正在尝试通过使用 MAMP 从我的数据库请求数据来创建一个动态下拉列表。
One of the tutorials I have tried has been talked about already and my version of the code is the same.我尝试过的教程之一已经讨论过了,我的代码版本是相同的。 Dynamic dropdown list with PHP & MYSQL
带有 PHP 和 MYSQL 的动态下拉列表
Although I am under the impression MAMP has a SQL server, I thought the problem was because I didn't have MySQL installed on my computer so I downloaded it, to no avail.虽然我的印象是 MAMP 有一个 SQL 服务器,但我认为问题是因为我的电脑上没有安装 MySQL,所以我下载了它,但无济于事。
I went into my Task Manager and tried looking for "MySQL service" although I couldn't find the exact tag I did see MySQL Writer is running, but the Browser and Agent INFLOW is not and refuse to start.我进入我的任务管理器并尝试寻找“MySQL 服务”,虽然我找不到确切的标签我确实看到 MySQL Writer 正在运行,但浏览器和代理 INFLOW 不是并且拒绝启动。
I went here into my computer ( c://windows/system32/drivers/etc.host ) and took off the #s that were before我进入我的电脑( c://windows/system32/drivers/etc.host )并取下之前的#s
127.0.0.1 localhost
::1 localhost
making sure each remained on a separate line, I restarted my computer but I still can't seem to connect.确保每个都保持在单独的行上,我重新启动了计算机,但似乎仍然无法连接。
Any suggestions on how I may be able to fix this?关于我如何解决这个问题的任何建议? I am extremely new to PHP and even newer to MySQL so, if possible, please try to keep any solutions simplified so I can follow along.
我对 PHP 非常陌生,甚至对 MySQL 也很陌生,所以,如果可能的话,请尽量简化任何解决方案,以便我可以跟进。
不确定问题究竟是什么,但我放弃了 MAMP 并安装了 XAMPP,现在一切似乎都在工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.