How can I run mysql in XAMPP server when I already have MySQL server installed in the same pc?

Question

Answer ( 1 )

  1. This answer was edited.

    Please watch this video:
    [videopress 5PotyKqK]

    When you have both XAMPP and a standalone MySQL server installed on the same computer, you may run into conflicts as both servers use the same default ports. To run MySQL in XAMPP, you will need to modify the default port number used by either the standalone MySQL server or the XAMPP MySQL server. Here are the steps you can follow:

    1. Stop the standalone MySQL server: Before starting the MySQL server in XAMPP, you need to stop the standalone MySQL server to avoid conflicts.
    2. Change the MySQL port in XAMPP: Open the XAMPP control panel and click on the “Config” button next to the Apache service. In the Apache configuration file, locate the line “Listen 3306” and change the port number to a different one, such as 3307. This will allow the XAMPP MySQL server to run on a different port.
    3. Start the XAMPP MySQL server: Once the port has been changed, you can start the XAMPP MySQL server from the XAMPP control panel.
    4. Connect to the XAMPP MySQL server: To connect to the XAMPP MySQL server, you will need to specify the new port number in your connection parameters. For example, if you changed the port to 3307, you would use “localhost:3307” as the server name when connecting to the MySQL server in XAMPP.

    These steps should allow you to run the MySQL server in XAMPP while avoiding conflicts with a standalone MySQL server.

    Best answer

Leave an answer