简体   繁体   English

MAMP 无法连接到本地主机上的 MySQL (10061) - 2017

[英]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.

相关问题 在 Windows 10 上使用 MAMP 无法连接到“本地主机”(10061)(2003)错误 phpmyadmin 上的 MySQL 服务器 - Can't connect to MySQL server on 'localhost' (10061) (2003) error phpmyadmin using MAMP on windows 10 #2003-无法连接到“本地主机”上的MySQL服务器(10061) - #2003 - Can't connect to MySQL server on 'localhost' (10061) 使用Mamp和MySQL(PHP)“无法连接” - “Unable to connect” using Mamp and MySQL (PHP) 无法使用MAMP通过localhost建立与MySQL的连接 - Can't establish connect to MySQL over localhost with MAMP 错误2003(HY000):无法连接到“本地主机”上的MySQL服务器(10061“未知错误”) - ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 “Unknown error”) 在 MAMP 中连接到 MySQL - Connect to MySQL in MAMP 运行MySQL的帮助。 SQL yog给出错误HY000):无法连接到“本地主机”上的MySQL服务器(10061) - Help in Running MySQL. SQL yog gives error HY000): Can't connect to MySQL server on 'localhost' (10061) 无法连接到IPAddress上的MySQL Server(10061) - Can't Connect to MySQL Server on IPAddress (10061) socket_connect(): 无法连接 [10061] - 目标机器主动拒绝它 - socket_connect(): unable to connect [10061] - target machine actively refused it 无法使用PHP连接到MAMP中的MYSQL - Cannot connect to MYSQL in MAMP using PHP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM