Phone Link Android Apps

Watch the full tutorial:

XAMPP’s MySQL button turns red, and the log says port 3306 is already in use. Something else on the PC is already holding the port MySQL expects. On a developer machine that is usually a standalone MySQL Server installed with MySQL Workbench.

You can leave that other MySQL alone and move XAMPP to port 3307. Both can run.

Point XAMPP at port 3307

  1. Open the XAMPP Control Panel.
  2. Click Config on the main panel (the one at the top right, not the Config button on the MySQL row yet).
  3. Choose Service and Port Settings.
  4. Open the MySQL tab and change the port from 3306 to 3307. Save.

Change my.ini in two places

The port has to match inside MySQL’s own config, or the service still tries 3306.

  1. On the MySQL row, click Config and choose my.ini. The file is normally C:xamppmysqlbinmy.ini.
  2. Press Ctrl + F and search for 3306.
  3. Under [client], set port=3307.
  4. Under [mysqld], set port=3307 as well. Both sections matter. Changing only one leaves clients and the server talking to different ports.
  5. Save the file.
  6. In the XAMPP Control Panel, start MySQL again.

The module should stay green. phpMyAdmin on that XAMPP install needs to use 3307 too. If phpMyAdmin still fails, open xamppphpMyAdminconfig.inc.php and set the host port to 3307.

Apps must use the new port

A project that says localhost and assumes 3306 will miss XAMPP after this change. Set the database port in the project’s .env or config file to 3307.

The standalone MySQL Server, if you install it later from the MySQL installer, keeps 3306. That split is what stops the clash. The Workbench and server install is a separate tutorial in this series, and so is editing my.ini for the Windows MySQL service rather than XAMPP.

Disclaimer

Sengideons.com does not host any files on its servers. All point to content hosted on third-party websites. Sengideons.com does not accept responsibility for content hosted on third-party websites and does not have any involvement in the same.

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Are you human? Please solve:Captcha