错误:服务器没有响应(或者本地MySQL服务器的套接字配置不正确)

发布于 2024-11-05 17:12:18 字数 640 浏览 0 评论 0原文

我正在学习PHP+MySQL。我没有购买网络托管计划,所以现在我计划在本地测试所有内容。根据我的研究,我找到了 WAMPserver.com。我下载了 WAMP 的安装程序并进行了基本设置,而没有真正更改设置中的任何内容或随后执行任何操作。我想创建一些数据库并在 SQL 中进行练习,但是当我单击 phpmyadmin 时,出现以下错误:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

我尝试用谷歌搜索此内容,但似乎无法弄清楚我做错了什么。我尝试更改 c:/wamp/apps 中的设置文件,但我认为我做得不正确,因为它仍然不起作用(我尝试将 phpmyadmin 和 sqlbuddy 配置文件更改为 localhost 上的 127.0.0.1,但不起作用,所以我更改了它返回到本地主机)。

编辑:所以到目前为止,我的应用程序 phpmyadmin 文件夹中的配置文件与安装时的方式没有改变。所以在端口、套接字、密码下什么都没有。我是否需要配置这个才能解决问题?如果是这样,我应该使用什么?

同样,我没有更改 apps 文件夹中 sqlbuddy1.3.2 的配置文件

I am learning PHP+MySQL. I did not buy a web hosting plan, so for now I plan to test everything locally. From my research, I found WAMPserver.com. I downloaded the install for WAMP and did a basic setup without really changing anything in the setup or doing any actions afterwards. I wanted to create some databases and practice in SQL, but when I click phpmyadmin, I get the following error:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

I tried googling for this and can't seem to figure out what I am doing wrong. I tried changing the setup files in c:/wamp/apps but I dont think I did it correct because it still didn't work (i tried changing the phpmyadmin and sqlbuddy config files to 127.0.0.1 on localhost, didnt work so I changed it back to localhost).

EDIT: So as of now my config file in the apps phpmyadmin folder is not changed from the way it came on the install. So under port, socket, password it has nothing. Do I need to configure this maybe to solve the problem? If so, what should I use?

Similarly, I have not changed the config file for sqlbuddy1.3.2 in the apps folder

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

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

发布评论

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

评论(4

嗼ふ静 2024-11-12 17:12:18

WAMP 是否真正启动并运行?它基本上(至少对我来说)是一个程序,你必须启动它才能让任何东西正常工作。您必须运行 wamp/wampmanager.exe(在 Windows 上)。

如果您使用的是 Windows,则任务托盘中应该有一个 WAMP 图标(如果它已启动并正在运行)。

Is WAMP actually started and running? It's basically (to me at least) a program that you have to start up to get anything working. You have to run wamp/wampmanager.exe (on Windows).

If you're using Windows there should be a WAMP icon in your task tray if it is started and running.

云朵有点甜 2024-11-12 17:12:18

在安装 wamp 之前,您的计算机上是否已安装并运行 apache 或 mysql 服务器(或任何其他服务器)?
甚至某些软件也可能使用端口 80 (HTTP) 或 3306 (MySQL)。

我不确定,但它可能是一个已经被占用的端口。

在命令行中尝试此操作(如果需要,请以管理员身份),它会告诉您该软件正在侦听计算机中的端口。

netstat

或者

netstat -a -b

Have you a apache or mysql server (or any other server) already installed and running on your computer before you installed wamp ?
Even some softwares may use port 80 (HTTP) or 3306 (MySQL).

I am not sure, but it can be a port already occupied.

Try this in a command line (as administrator if needed), it will tell you the software listening to a port in your computer.

netstat

or

netstat -a -b
背叛残局 2024-11-12 17:12:18

你的硬盘上可能有一些旧的 my.ini 或 my.cnf 文件,其中的选项不再受新的 mysql 版本支持。找到 my_print_defaults.exe 并运行它以查看 mysql 在哪里查找其配置文件以及以什么顺序。将所有旧文件重命名为其他文件,并仅将 wamp 目录中的文件保留下来。

You probably have some old my.ini or my.cnf file lying somewhere on your hd with options no longer supported by new mysql versions. Find my_print_defaults.exe and run it to see where mysql is looking for its configuration files and in what order. Rename any old files to something else and leave only the one in the wamp directory.

奢欲 2024-11-12 17:12:18

尝试xampp。安装超级简单,而且效果很好。

http://www.apachefriends.org/en/xampp.html

将文件移至并确保停止 WAMP 服务器,否则 Apache 会发生冲突。

Try xampp. Super simple installation and works like a charm.

http://www.apachefriends.org/en/xampp.html

Move your files over and make sure you stop your WAMP server or Apache will collide.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文