Find Which Local MySQL Instance Your App Is Using

Last updated: December 1, 2026.

Two MySQL installations can have different program folders while your app still connects to the same server. On Windows, begin by matching each configured TCP port to a listening process.

netstat -ano -p tcp

Match ports to processes

In the output, look under Local Address for the ports configured for the two servers, such as 3307 and 3308. Compare the PID column for the LISTENING rows. Look up each PID on the Details tab in Task Manager. One process can have distinct IPv4 and IPv6 listeners, so several rows alone do not establish that you have two instances.

Open the database tool with the same host and port the application uses. Run SELECT @@port, @@datadir, DATABASE() through the application connection too. Compare the results. The data directory identifies where the server stores its data. The schema name alone cannot distinguish two instances containing copies of the same schema.

Give each app an explicit endpoint

For a TCP setup, configure the applications with explicit endpoints, for example 127.0.0.1:3307 and 127.0.0.1:3308. Use the host and port fields the driver expects. For a MySQL CLI cross-check, pass the same host and port with --protocol=TCP. Confirm the app is reading the intended configuration and refresh existing connection pools after any change.

Configure a separate data directory and TCP listener for each server. If you intentionally use Windows named pipes, give each instance a distinct pipe name and check the client transport separately. Validate both applications while both servers are running. For persistent confusion, inspect the service startup options to see which configuration file each process actually uses.

Documentation

Related guides

Sergey Kornilov

Sergey Kornilov