且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

XAMP中的MySQL服务器无法启动

更新时间:2023-02-23 22:12:14

当我下载MySQL Workbench和XAMPP时遇到了同样的问题. 由于他们都试图访问端口3306,因此发生错误.我正在Windows 10上运行此程序,我不确定此修复程序是否也适用于Mac& Linux. 我将XAMPP的端口更改为3307,并保持了MySQL不变.这是我的方法: *请注意,系统上的行号可能会有所不同.

I ran into this same issue when I had MySQL Workbench and XAMPP downloaded. Since they're both trying to access Port 3306 an error occurs. I'm running this on Windows 10, I'm not sure if this fix also works on Mac & Linux. I changed the port of XAMPP to 3307 and left the MySQL untouched. Here's how I did that: *Take into consideration that the line numbers may be different on your system.

  1. 在XAMPP GUI中,单击配置"->服务和端口设置"​​->"MySQL"选项卡->将主端口更改为3307->保存->保存

  1. In the XAMPP GUI click on "Config" -> "Service and Port Settings" -> "MySQL" tab -> Change Main Port to 3307 -> Save -> Save

找到XAMPP的安装文件->打开MySQL文件夹->打开bin文件夹->右键单击"my.ini"并进行编辑

Locate the installation file for XAMPP -> open MySQL folder -> open bin folder -> right click on "my.ini" and edit it

更改以下几行: (第20行)端口= 3306->端口= 3307 (第28行)端口= 3306->端口= 3307

Change the following lines: (Line 20) Port = 3306 -> Port = 3307 (Line 28) Port = 3306 -> Port = 3307

保存文件,重新启动计算机,服务器应运行.

Save the file, restart your computer, and the server should run.