MySQL和XAMPP的端口冲突 [英] Conflicting ports of mySQL and XAMPP

查看:826
本文介绍了MySQL和XAMPP的端口冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用XAMPP/Apache已有一段时间了,最​​近决定安装MySQL.但是,似乎它们正在发生冲突. MySQL似乎正在优先使用,并且可以正常运行,但是XAMPP/Apache在尝试启动Apache时给了我此错误消息:

I've been using XAMPP/Apache for a while and recently decided to install MySQL. However it seems that they are conflicting. MySQL seems to be taking preference, and it functioning correctly, however XAMPP/Apache is giving me this error message when attempting to start Apache:

03:07:32 AM  [Apache]   Attempting to start Apache app...
03:07:33 AM  [Apache]   Status change detected: running
03:07:33 AM  [Apache]   Status change detected: stopped
03:07:33 AM  [Apache]   Error: Apache shutdown unexpectedly.
03:07:33 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
03:07:33 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
03:07:33 AM  [Apache]   Press the Logs button to view error logs and check
03:07:33 AM  [Apache]   the Windows Event Viewer for more clues
03:07:33 AM  [Apache]   If you need more help, copy and post this
03:07:33 AM  [Apache]   entire log window on the forums

我尝试按照此处的说明进行操作: http://www .complete-concrete-concise.com/web-tools/how-to-to-change-the-apache-port-in-xampp

I tried following the instructions here: http://www.complete-concrete-concise.com/web-tools/how-to-change-the-apache-port-in-xampp

我尝试更改文档:xampp/apache/conf中的httpd.conf

And I've tried changing the document: httpd.conf in xampp/apache/conf

将"Listen 80"更改为各种内容,并在重新启动应用程序后出现相同的错误消息.

Changing 'Listen 80' to various things, and after restarting the the application I had the same error message occur.

非常感谢您在此问题上的任何帮助.我宁愿不要仅仅为了使用XAMPP而删除mySQL,而是如果没有办法使它们两者同时运行.

Would greatly appreciate any assistance in this matter. I'd prefer not to remove mySQL just to use XAMPP, but will if there is no way for them to both operate simultaneously.

谢谢.

我认为它与MySQL冲突的原因是:

My reason for believing it is conflicting with MySQL is this:

03:26:51 AM  [mysql]    Problem detected!
03:26:51 AM  [mysql]    Port 3306 in use by ""C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56"!
03:26:51 AM  [mysql]    MySQL WILL NOT start without the configured ports free!
03:26:51 AM  [mysql]    You need to uninstall/disable/reconfigure the blocking application
03:26:51 AM  [mysql]    or reconfigure MySQL and the Control Panel to listen on a different port

我在暂时禁用mySQL以使用XAMPP/Apache方面遇到一些困难. 有什么方法可以更改端口以便它们可以共存吗?

I'm having some difficulties disabling mySQL temporarily to make use of XAMPP/Apache. Is there any way to change the ports so that they can co-exist?

尝试按照此处的说明进行操作: http://silentlyrun .blogspot.com.au/2013/02/how-to-change-apache-n-mysql-port-for.html

Tried to follow instructions here: http://silentlyrun.blogspot.com.au/2013/02/how-to-change-apache-n-mysql-port-for.html

我在以下情况下遇到这些错误消息:

I encounter these error messages after:

09:13:22 AM  [main]     Initializing Modules
09:13:22 AM  [Apache]   Problem detected!
09:13:22 AM  [Apache]   Port 80 in use by "Unable to open process" with PID 4084!
09:13:22 AM  [Apache]   Apache WILL NOT start without the configured ports free!
09:13:22 AM  [Apache]   You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port
09:13:22 AM  [Apache]   Problem detected!
09:13:22 AM  [Apache]   Port 443 in use by "Unable to open process" with PID 4084!
09:13:22 AM  [Apache]   Apache WILL NOT start without the configured ports free!
09:13:22 AM  [Apache]   You need to uninstall/disable/reconfigure the blocking application
09:13:22 AM  [Apache]   or reconfigure Apache and the Control Panel to listen on a different port

根据这些说明,新端口应该相同吗?我想是因为他们本来都是80岁.

With these instructions, should the new port be the same? I assume so because they are both originally 80.

4. Search the string "Listen" in the file.
5. Replace port number 80 to any other unused port number.
6. Search for "ServerName" in the file.
7. Replace port number 80 to any other unused port number in the ServerName.

由于我未知的原因,从上面的silentlyrun.blogspot链接重新安装和更改端口后,XAMPP/MySQL可以正常工作. 但是XAMPP/Apache仍然存在问题:

For a reason unknown to me, XAMPP/MySQL works without issue after a reinstall and port change from the silentlyrun.blogspot link above. However XAMPP/Apache is still giving issues:

09:32:14 AM  [Apache]   Error: Apache shutdown unexpectedly.
09:32:14 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
09:32:14 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
09:32:14 AM  [Apache]   Press the Logs button to view error logs and check
09:32:14 AM  [Apache]   the Windows Event Viewer for more clues
09:32:14 AM  [Apache]   If you need more help, copy and post this
09:32:14 AM  [Apache]   entire log window on the forums

推荐答案

要解决MySQL端口和服务冲突,当另一个MySQL Server正在运行时,您需要执行以下步骤:-

To Resolve MySQL Port and Service conflict when already another MySQL Server is running, you need to follow following steps:-

1)关闭XAMPP服务器

1) Close XAMPP Server

2)打开文件C:\ xampp \ mysql \ bin \ my.ini(C:是默认的XAMPP安装)

2) Open file C:\xampp\mysql\bin\my.ini (C: is the default XAMPP Installation)

3)将端口号3306替换为3307

3) Replace the port number 3306 with 3307

#密码= your_password

# password = your_password

端口= 3307

socket ="C:/xampp/mysql/mysql.sock"

socket = "C:/xampp/mysql/mysql.sock"

#MySQL服务器

# The MySQL server

[mysqld]

端口= 3307

4)保存文件并打开XAMPP控制面板

4) Save the file and open XAMPP Control Panel

5)在XAMPP控制面板中,单击配置> 服务和端口设置

5) In XAMPP Control Panel Click on Config > Service and Port Settings

6)转到 MySQL 标签

7)将服务名称 mysql 更改为 mysqlxampp ,并将主端口 3306 更改为 3307

7) Change Service name mysql to mysqlxampp and Main port 3306 to 3307

8)单击保存",然后单击保存"并关闭XAMPP

8) Click on Save then Save and close XAMPP

9)再次运行XAMPP,您将能够启动MySQL服务器

9) Run Again XAMPP and you will be able to start the MySQL Server

您可能还会遇到phpMyAdmin问题 您可以为其添加行

You might also face issue with phpMyAdmin For which you can add line

$ cfg ['Servers'] [$ i] ['port'] ='3307';

$cfg['Servers'][$i]['port'] = '3307';

在phpMyAdmin根目录中的config.inc.php文件中.

in your config.inc.php file in phpMyAdmin root directory.

这篇关于MySQL和XAMPP的端口冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆