Apache - MySQL服务发现错误路径。/已在使用的港口。

时间:2022-10-26 08:58:03

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服务都在运行。

9 个解决方案

#1


59  

  1. Go to cmd and run it with Administrator mode.
  2. 进入cmd并以管理员模式运行它。
  3. Uninstall mysql service through command prompt using the following command.

    使用下面的命令,通过命令提示卸载mysql服务。

            sc delete mysql
    
  4. restart XAMPP

    重启XAMPP

#2


12  

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/xamppand multiinstances -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

这是我修改后的设置:编辑你的“my”。ini文件在c:\xampp\mysql\bin\ \更改所有默认的3306端口条目到一个新值3308。

edit your “php.ini” in c:\xampp\php and replace 3306 by 3308

编辑你的php”。in c:\xampp\php,用3306替换3306。

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"

exe创建“mysqlweb”binPath=“C:\xampp\mysql\bin\mysqld”。exe——defaults-file = c:\ xampp \ mysql \ bin \我。ini mysqlweb”

Open Windows Services and set Startup Type: Automatic, Start the service

打开Windows服务并设置启动类型:自动启动服务。

#3


6  

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上看到十字符号。点击十字符号,点击开始。这是所有。

#4


5  

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

在赢得7中1。首先确保XAMPP控制面板不运行2。SHIFT+右击XAMPP控制面板3。4点击属性。在属性中选择标签“兼容性”5。在“权限级别”下的选项卡底部选中“以管理员身份运行此程序”。单击OK

this worked for me

这为我工作

#5


5  

This is how I solved similar problem:

这就是我解决类似问题的方法:

  1. Launch XAMPP Control Panel.
  2. XAMPP启动控制面板。
  3. Uninstall the MySQL service: click 'green check' button beside MySQL, under Service column. The 'green check' button will change into 'red cross' button.
  4. 卸载MySQL服务:在服务列下,在MySQL旁边单击“绿色检查”按钮。“绿色检查”按钮会变成“红十字会”按钮。
  5. Exit XAMPP, and relaunch it again.
  6. 退出XAMPP,并重新启动它。
  7. Click Start.
  8. 单击“开始”。

I hope it can help solve your problem too.

我希望它也能帮助解决你的问题。

#6


4  

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并右键单击它。然后单击停止的过程。这对我很有效,我希望它对你有效。

#7


0  

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,在services选项卡uncheck wampmysqld中取消激活,重新启动计算机应该工作。

#8


0  

  • 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 filezilla and 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.

    很容易解决这个问题。大多数被提出这个问题的人可能都没有意识到你还没有安装完整的软件:)我试着上网,但几乎没有成功,除非有人提到你需要寻找那些已经运行的服务。例如,你在filezilla的任务管理器中查找filezilla的问题,然后停止这个过程,然后在xampp控制面板中点击X来安装filezilla,然后单击run,它应该启动服务,通常会显示一个带有复选标记的绿色lite。

  • Same goes for mysql issues.

    mysql问题也是一样。

  • As for the apache problem, 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 :)

    至于apache问题,它通常是一个被skype或其他程序所取代的端口的问题,但是您可以找到如何轻松解决这个问题的信息:)

#9


0  

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服务。因此我修改了我的两个。ini mysql(C:\ xampp \ \ 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"

exe创建“mysqlweb”binPath=“C:\xampp\mysql\bin\mysqld”。exe——defaults-file = c:\ xampp \ mysql \ bin \我。ini mysqlweb”

#1


59  

  1. Go to cmd and run it with Administrator mode.
  2. 进入cmd并以管理员模式运行它。
  3. Uninstall mysql service through command prompt using the following command.

    使用下面的命令,通过命令提示卸载mysql服务。

            sc delete mysql
    
  4. restart XAMPP

    重启XAMPP

#2


12  

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/xamppand multiinstances -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

这是我修改后的设置:编辑你的“my”。ini文件在c:\xampp\mysql\bin\ \更改所有默认的3306端口条目到一个新值3308。

edit your “php.ini” in c:\xampp\php and replace 3306 by 3308

编辑你的php”。in c:\xampp\php,用3306替换3306。

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"

exe创建“mysqlweb”binPath=“C:\xampp\mysql\bin\mysqld”。exe——defaults-file = c:\ xampp \ mysql \ bin \我。ini mysqlweb”

Open Windows Services and set Startup Type: Automatic, Start the service

打开Windows服务并设置启动类型:自动启动服务。

#3


6  

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上看到十字符号。点击十字符号,点击开始。这是所有。

#4


5  

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

在赢得7中1。首先确保XAMPP控制面板不运行2。SHIFT+右击XAMPP控制面板3。4点击属性。在属性中选择标签“兼容性”5。在“权限级别”下的选项卡底部选中“以管理员身份运行此程序”。单击OK

this worked for me

这为我工作

#5


5  

This is how I solved similar problem:

这就是我解决类似问题的方法:

  1. Launch XAMPP Control Panel.
  2. XAMPP启动控制面板。
  3. Uninstall the MySQL service: click 'green check' button beside MySQL, under Service column. The 'green check' button will change into 'red cross' button.
  4. 卸载MySQL服务:在服务列下,在MySQL旁边单击“绿色检查”按钮。“绿色检查”按钮会变成“红十字会”按钮。
  5. Exit XAMPP, and relaunch it again.
  6. 退出XAMPP,并重新启动它。
  7. Click Start.
  8. 单击“开始”。

I hope it can help solve your problem too.

我希望它也能帮助解决你的问题。

#6


4  

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并右键单击它。然后单击停止的过程。这对我很有效,我希望它对你有效。

#7


0  

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,在services选项卡uncheck wampmysqld中取消激活,重新启动计算机应该工作。

#8


0  

  • 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 filezilla and 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.

    很容易解决这个问题。大多数被提出这个问题的人可能都没有意识到你还没有安装完整的软件:)我试着上网,但几乎没有成功,除非有人提到你需要寻找那些已经运行的服务。例如,你在filezilla的任务管理器中查找filezilla的问题,然后停止这个过程,然后在xampp控制面板中点击X来安装filezilla,然后单击run,它应该启动服务,通常会显示一个带有复选标记的绿色lite。

  • Same goes for mysql issues.

    mysql问题也是一样。

  • As for the apache problem, 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 :)

    至于apache问题,它通常是一个被skype或其他程序所取代的端口的问题,但是您可以找到如何轻松解决这个问题的信息:)

#9


0  

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服务。因此我修改了我的两个。ini mysql(C:\ xampp \ \ 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"

exe创建“mysqlweb”binPath=“C:\xampp\mysql\bin\mysqld”。exe——defaults-file = c:\ xampp \ mysql \ bin \我。ini mysqlweb”