Apache - 检测到 MySQL 服务的路径错误。/ 端口已被使用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15718157/
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
Apache - MySQL Service detected with wrong path. / Ports already in use
提问by Anoniem Anoniem
I'm getting the following errors when I launch XAMPP.
启动 XAMPP 时出现以下错误。
12:35:23 [main] Initializing Control Panel
12:35:23 [main] Windows Version: 64-bit
12:35:23 [main] XAMPP Version: 1.8.1
12:35:23 [main] Control Panel Version: 3.1.0 3.1.0 [ Compiled: September 20th 2012 ]
12:35:23 [main] Running with Administrator rights - good!
12:35:23 [main] XAMPP Installation Directory: "c:\xampp\"
12:35:23 [main] Checking for prerequisites
12:35:23 [main] All prerequisites found
12:35:23 [main] Initializing Modules
12:35:23 [Apache] XAMPP Apache Service is already running on port 80
12:35:23 [Apache] XAMPP Apache Service is already running on port 443
12:35:23 [mysql] MySQL Service detected with wrong path
12:35:23 [mysql] Change XAMPP MySQL settings or
12:35:23 [mysql] Uninstall/disable the other service manually first
12:35:23 [mysql] Found Path: "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL
12:35:23 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
12:35:23 [mysql] Problem detected!
12:35:23 [mysql] Port 3306 in use by "mysqld.exe"!
12:35:23 [mysql] MySQL WILL NOT start without the configured ports free!
12:35:23 [mysql] You need to uninstall/disable/reconfigure the blocking application
12:35:23 [mysql] or reconfigure MySQL to listen on a different port
12:35:23 [main] Starting Check-Timer
12:35:23 [main] Control Panel Ready
I wasn't able to find a proper solution on google, so I'm kinda' hoping someone could help me out with this.
我无法在谷歌上找到合适的解决方案,所以我有点希望有人能帮我解决这个问题。
Oh and, XAMPP is running properly. Apache and the MySQL service are both running ..
哦,XAMPP 运行正常。Apache 和 MySQL 服务都在运行..
回答by Ahmed Abobakr
- Go to cmd and run it with Administrator mode.
Uninstall mysql service through command prompt using the following command.
sc delete mysql
restart XAMPP
- 转到cmd并以管理员模式运行它。
使用以下命令通过命令提示符卸载 mysql 服务。
sc delete mysql
重启 XAMPP
回答by Tommer
To delete existing service is not good solution for me, because on port 3306 run MySQL, which need other service. But it is possible to run two MySQL services at one time (one with other name and port). I found the solution here: http://emjaywebdesigns.com/xampp-and-multiple-instances-of-mysql-on-windows/
删除现有服务对我来说不是一个好的解决方案,因为在端口 3306 上运行 MySQL,这需要其他服务。但是可以同时运行两个 MySQL 服务(一个具有其他名称和端口)。我在这里找到了解决方案:http: //emjaywebdesigns.com/xampp-and-multiple-instances-of-mysql-on-windows/
Here is my modified setting: Edit your “my.ini” file in c:\xampp\mysql\bin\ Change all default 3306 port entries to a new value 3308
这是我修改后的设置:编辑 c:\xampp\mysql\bin\ 中的“my.ini”文件将所有默认 3306 端口条目更改为新值 3308
edit your “php.ini” in c:\xampp\php and replace 3306 by 3308
编辑 c:\xampp\php 中的“php.ini”并将 3306 替换为 3308
Create the service entry - in Windows command line type
创建服务条目 - 在 Windows 命令行类型中
sc.exe create "mysqlweb" binPath= "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"
sc.exe create "mysqlweb" binPath="C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"
Open Windows Services and set Startup Type: Automatic, Start the service
打开 Windows 服务并设置启动类型:自动,启动服务
回答by user2854408
This is how I solved similar problem:
这是我解决类似问题的方法:
- Launch XAMPP Control Panel.
- Uninstall the MySQL service: click 'green check' button beside MySQL, under Servicecolumn. The 'green check' button will change into 'red cross' button.
- Exit XAMPP, and relaunch it again.
- Click Start.
- 启动 XAMPP 控制面板。
- 卸载 MySQL 服务:单击服务栏下 MySQL 旁边的“绿色检查”按钮。“绿色检查”按钮将变为“红十字”按钮。
- 退出 XAMPP,然后重新启动它。
- 单击开始。
I hope it can help solve your problem too.
我希望它也可以帮助解决您的问题。
回答by Hasan
Firstly enter cmd
.
首先进入cmd
。
Then write:
然后写:
sc delete MySQL
After that restart your computer. When restarting your computer and opening your xampp
, you can see cross symbol on the MySQL
. Click the cross symbol and click the start. That's all.
之后重新启动计算机。重新启动计算机并打开您的计算机时xampp
,您可以在MySQL
. 单击十字符号并单击开始。就这样。
回答by Ton
Set XAMPP controlpanel to run under Administrator priviledges.
将 XAMPP 控制面板设置为在管理员权限下运行。
In Win 7 1. First make sure XAMPP control panel is not running 2. SHIFT+right click on XAMPP Control Panel 3. Click on properties 4. In properties select tab 'Compatibility' 5. On bottom of the tab under 'Privilege level' check the box "Run this program as an administrator" 6. Click OK
在 Win 7 中 1. 首先确保 XAMPP 控制面板未运行 2. SHIFT+右键单击 XAMPP 控制面板 3. 单击属性 4. 在属性中选择选项卡“兼容性” 5. 在选项卡底部的“权限级别”下选中“以管理员身份运行此程序”框 6. 单击“确定”
this worked for me
这对我有用
回答by Ty Rice
Ok so i found out the problem :)
好的,所以我发现了问题:)
ctrl+alt+delete to start task manager, once you get to task manager go to services. find MySQL and right click on it. Then click stop process. That worked for me and i hope it works for you :D
ctrl+alt+delete 启动任务管理器,进入任务管理器后进入服务。找到 MySQL 并右键单击它。然后单击停止进程。这对我有用,我希望它对你有用:D
回答by grinder3011
Ok it's very easy actually to solve this...most of you who are presented with this problem probably don't even realize you don't have the full software yet installed :) I tried looking online with little success except some1 mentioned you need to look for those services running already. Forexample problem with filezilla you look in task manager for filezillaand you stop the process then you click the X in the xampp control pannel to install filezilla and then click run and it should start the service normally showing you a green lite with a check mark.
Same goes for mysqlissues.
As for the apacheproblem, it usualy is a problem with the port being overtaken by skype or some other program, but you can find info how to solve that on the net easily :)
好的,实际上很容易解决这个问题……大多数遇到这个问题的人可能甚至没有意识到你还没有安装完整的软件:) 我尝试在网上查找但收效甚微,除了有人提到你需要寻找那些已经运行的服务。例如,您在任务管理器中查找filezilla 的 filezilla 问题,然后停止该进程,然后单击 xampp 控制面板中的 X 以安装 filezilla,然后单击运行,它应该会正常启动服务,并显示带有复选标记的绿色精简版。
这同样适用于MySQL的问题。
至于apache问题,通常是端口被Skype或其他程序占用的问题,但您可以在网上轻松找到如何解决该问题的信息:)
回答by becon
its because you probaly installed wamp server and uninstall it but wampmysql.exe still running and using the default mysql port go to msconfig under services tab uncheck wampmysqld to deactivate it reboot the computer should work
这是因为您可能安装了 wamp 服务器并卸载它但 wampmysql.exe 仍在运行并使用默认的 mysql 端口转到服务选项卡下的 msconfig 取消选中 wampmysqld 以停用它重新启动计算机应该可以工作
回答by mircea
about this specificissue:
关于这个具体问题:
12:35:23 [mysql] Found Path: "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" MySQL
12:35:23 [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
notice that .exeis missing from 1st row at the end of mysqld.
请注意,mysqld 末尾的第一行缺少.exe。
To fix this, start regedit.exeand change
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mysql
ImagePathby adding the .exeextension.
要解决此问题,请启动regedit.exe并
通过添加.exe扩展名更改
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mysql
ImagePath。
Restart xampp control paneland this error should not show up.
重新启动xampp 控制面板,不应出现此错误。
回答by Vadzim Papko
In my case this issue caused because my local machine used to the one MySQL service installed earlier at 3006 port. Thus I modified both my.ini(C:\xampp\mysql\bin\my.ini) and php.ini(C:\xampp\php\php.ini) files replaced port 3006 to 3008
在我的例子中,这个问题是因为我的本地机器习惯于之前在 3006 端口安装的一个 MySQL 服务。因此我修改了my.ini(C:\xampp\mysql\bin\my.ini) 和php.ini(C:\xampp\php\php.ini) 文件将端口 3006 替换为 3008
After that I've created a new service running the command described above by Tommer:
之后,我创建了一个运行Tommer上面描述的命令的新服务:
sc.exe create "mysqlweb" binPath= "C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"
sc.exe create "mysqlweb" binPath="C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysqlweb"