MySQL Wamp 服务器错误 [本地服务器 - 3 个服务中的 2 个正在运行]
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48308826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wamp Server Error [Local Server - 2 of 3 services running]
提问by Nihar
I am new to wamp servers and trying to install wampServer 3.1.0 on my windows 10 machine .
我是 wamp 服务器的新手,并试图在我的 Windows 10 机器上安装 wampServer 3.1.0。
Somehow it is not installed properly and is having configuration error .
不知何故,它没有正确安装并且出现配置错误。
At present "Wamp server is still in orange state and is throwing the error"
目前“Wamp服务器仍处于橙色状态并抛出错误”
2 of 3 services running
3 个服务中的 2 个正在运行
As of my understanding either of Apache,MySQl orPHP is not working . On further investigation I found that Apache is ok. But on running mysql.exe(C:\wamp64\bin\mysql\mysql5.7.19\bin) it is throwing :
据我了解 Apache、MySQl 或 PHP 都不起作用。在进一步调查中,我发现 Apache 没问题。但是在运行 mysql.exe(C:\wamp64\bin\mysql\mysql5.7.19\bin) 时,它会抛出:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
错误 2003 (HY000):无法连接到“本地主机”上的 MySQL 服务器 (10061)
which lands me to SO-32519474,
I tried following the steps ,but it looks good to me in my case .
On further searching I find that wampmysqld64 is stopped in the services.
when I am trying to restart it I am getting the error
这使我进入SO-32519474,我尝试按照步骤操作,但在我的情况下它看起来不错。在进一步搜索时,我发现 wampmysqld64 在服务中已停止。当我尝试重新启动它时出现错误
I am stuck up here and have no further clue how to get it fixed
我被困在这里,不知道如何修复它
Any help is highly appreciated.
任何帮助都受到高度赞赏。
采纳答案by Nihar
I got to this SOI=35670755and executed this command
我到了这个SOI=35670755并执行了这个命令
mysqld --initialize
mysqld --初始化
inside (C:\wamp64\bin\mysql\mysql5.7.19\bin)
里面(C:\wamp64\bin\mysql\mysql5.7.19\bin)
this fixed my issue.
这解决了我的问题。
If in case you still have issues refer to this post Wamp Server Error [Local Server - 2 of 3 services running]
如果您仍有问题,请参阅此帖子 Wamp 服务器错误 [本地服务器 - 3 个服务中的 2 个正在运行]
**Edit:
**编辑:
mysqld --initialize
mysqld --初始化
may not be a great solution ,its kind of patch work. It leads to issues with username and password. The best way to install xampp is completely described in the following links
可能不是一个很好的解决方案,它的补丁工作。它会导致用户名和密码出现问题。安装 xampp 的最佳方法在以下链接中有完整的描述
Wamp Server Error [Local Server - 2 of 3 services running]& Error While Logging into MYSQL
回答by Yohec Soto
In my case was the Apache Service.
就我而言,是 Apache 服务。
- So I clicked the Wamp icon, then Apache > Service administration 'wampapache64' > Install Service.
- Then again Wamp icon, then Apache > Service administration 'wampapache64' > Start Service.
- And finally Wamp icon > Restart All Services.
- 所以我单击 Wamp 图标,然后单击 Apache > 服务管理“wampapache64” > 安装服务。
- 然后再次 Wamp 图标,然后 Apache > 服务管理 'wampapache64' > 启动服务。
- 最后是 Wamp 图标 > 重新启动所有服务。
回答by Rajanikanta Pradhan
I faced the same issue , related to MYSQL , If in your system mysql was there, later you installed WAMP then again one MYSQL will install as WAMP package, default port for MYSQL is 3306 , So in both mysql the port will be 3306, which is a port conflict, So just change the port it will work fine. Steps to change the Port.
我遇到了同样的问题,与 MYSQL 相关,如果您的系统中有 mysql,那么稍后您安装了 WAMP,然后又一个 MYSQL 将安装为 WAMP 包,MYSQL 的默认端口是 3306,因此在两个 mysql 中,端口都是 3306,即是端口冲突,所以只需更改端口即可正常工作。更改端口的步骤。
- Right click the icon.
- Chose Tool
- Change the port in Port used by MySql Section.
- 右键单击该图标。
- 选择工具
- 更改 MySql 部分使用的端口中的端口。
回答by Amateur-beginner-level-noob
For me, this issue occurred when I first used WAMP 10 mins ago.
对我来说,这个问题发生在我 10 分钟前第一次使用 WAMP 时。
In case someone had the same issue as me, my solution was the following:
如果有人和我有同样的问题,我的解决方案如下:
- Click the WAMP icon and simply Start All Services
- 单击 WAMP 图标并简单地启动所有服务
worked like a charm.
像魅力一样工作。
回答by Robbie Hymanson
I found that WAMP can create a configuration report which details where problems lie.
我发现 WAMP 可以创建一个配置报告,详细说明问题所在。
Right-click on the WAMP icon, then Tools, then Create Wampserver Configuration Report (near the bottom). WAMP then opens and closes several cmd windows in generating the configuration report (wampConfReport.txt in the wamp directory).
右键单击 WAMP 图标,然后单击工具,然后单击创建 Wampserver 配置报告(靠近底部)。WAMP 然后打开和关闭几个 cmd 窗口以生成配置报告(wamp 目录中的 wampConfReport.txt)。
Then again right-click on the WAMP icon, then Tools, then Wampserver Configuration Report. This will open the configuration report in your default text editor, and you can look through it to find what the problem is.
然后再次右键单击 WAMP 图标,然后单击工具,然后单击 Wampserver 配置报告。这将在您的默认文本编辑器中打开配置报告,您可以查看它以找出问题所在。
In my case I had another mysqld process listening on the port, and the report included the lines:
就我而言,我有另一个 mysqld 进程在侦听端口,报告中包含以下几行:
Your port 3307 is used by a processus with PID = 3132
The processus of PID 3132 is 'mysqld.exe' Session: Services
The service of PID 3132 for 'mysqld.exe' is 'MySQL57'
*** ERROR *** This service IS NOT from Wampserver - Should be: 'wampmysqld64' or 'wampmariadb64'
So after killing the process with PID 3132 and restarting WAMP everything worked ok.
因此,在使用 PID 3132 终止进程并重新启动 WAMP 后,一切正常。
回答by icyNerd
Check if MySQL is open, close it. Go to task manager and end process tree. Now restart wampserver. And then the MySQL (when it turns green). Hopefully it will work! As it happens, wampserver uses the same port as MySQL, therefore, the mysql service is unable to run when MySQL is running.
检查 MySQL 是否打开,关闭它。转到任务管理器并结束进程树。现在重新启动 wampserver。然后是 MySQL(当它变成绿色时)。希望它会起作用!碰巧,wampserver 使用的端口与 MySQL 相同,因此在 MySQL 运行时无法运行 mysql 服务。
回答by Ali Mustafa
I found this solution after I encountered the same problem.
我遇到同样的问题后找到了这个解决方案。
Right click on your local server
Go to wamp setting
Disable mariaDB
右键单击您的本地服务器
转到 wamp 设置
禁用 mariaDB
回答by Golovkin
Open your MySQL log through the Wampserver icon in your taskbar. It shows the error that is preventing the service from starting. Chances are the error is due to the port being used by some other program. Now all you need to do is run MySQL on some port other than the one your computer is trying (and failing) to use. Do this by right clicking on the Wampserver icon (in your taskbar), going to MySQL and clicking on "Use a port other than __". Type in a port that is not being used by any service. Type netstat -an in your command prompt to see all the ports that are being used. Your new port should be such that it is not present here. The icon should go green now.
通过任务栏中的 Wampserver 图标打开 MySQL 日志。它显示了阻止服务启动的错误。错误可能是由于某个其他程序正在使用该端口造成的。现在您需要做的就是在某个端口上运行 MySQL,而不是您的计算机尝试(但失败)使用的端口。为此,请右键单击 Wampserver 图标(在您的任务栏中),转到 MySQL 并单击“使用 __ 以外的端口”。输入未被任何服务使用的端口。在命令提示符中键入 netstat -an 以查看正在使用的所有端口。您的新端口应该不存在于此处。图标现在应该变成绿色。
回答by Awab Ijaz
Adding to the answer above:
补充上面的答案:
In my case was the Apache Service.
- So I clicked the Wamp icon, then Apache > Service administration 'wampapache64' > Install Service.
- Then again Wamp icon, then Apache > Service administration 'wampapache64' > Start Service.
- And finally Wamp icon > Restart All Services.
就我而言,是 Apache 服务。
- 所以我单击 Wamp 图标,然后单击 Apache > 服务管理“wampapache64” > 安装服务。
- 然后再次 Wamp 图标,然后 Apache > 服务管理 'wampapache64' > 启动服务。
- 最后是 Wamp 图标 > 重新启动所有服务。
If Install Service is not working just open your task manager and see if apache is already running and if so, just end those processes and then follow the answer above.
如果安装服务不起作用,只需打开您的任务管理器,看看 apache 是否已经在运行,如果是,只需结束这些进程,然后按照上面的答案进行操作。