MySQL Workbench is a client, not the database server. To connect to localhost, a MySQL Server instance must be installed, running, and listening through the same connection method and endpoint configured in Workbench. Start by identifying the full error; a refused connection, a missing socket, and “Access denied” point to different problems.
What the error tells you
Save the complete error message and code before changing settings. The wording helps distinguish a server that is not accepting connections from an authentication failure.
As an Amazon Associate I earn from qualifying purchases.
- “Connection refused” or a connection error such as 2002/2003: the configured endpoint may have no listener, the server may be stopped, TCP/IP may be disabled or bound elsewhere, or a firewall may be blocking the connection.
- A socket-file or named-pipe error: Workbench may be looking for a local endpoint at a path or name the server does not use.
- “Access denied”: the server responded, but the login, authentication details, or account permissions for the connecting host need attention. Changing the port usually will not fix this branch.
Oracle’s MySQL connection-error guidance and troubleshooting documentation describe these as separate connection and account issues. Those pages are for MySQL 8.0; details can vary by server version.
Free tools Windows power users keep installed
One-click scans. No signup required.
Check that MySQL Server is installed and running
Workbench does not start or provide a database server merely because the application opens. Oracle’s Workbench tutorial states: “An instance of MySQL server must be installed, started, and accessible to MySQL Workbench before you begin.” Check the MySQL Server service or process using the controls for your operating system and installation method. If no server instance is installed, install or otherwise obtain access to one before configuring a connection.
#1 Best Overall
Workbench can display or manage server status when its connection has the correct system profile configured; that is not a substitute for having a server installed and reachable. See Oracle’s Workbench system-profile documentation.
Match Workbench’s connection method to the server
Workbench supports different local connection methods. Choose the one the server is configured to provide; the address or path for one method cannot be substituted for another.
Rank #2
| Method | What Workbench needs | What to verify |
|---|---|---|
| Standard TCP/IP | Host name or IP address and port | The server is listening on that address and port, and TCP/IP is enabled. |
| Local socket or pipe | Unix socket-file path, or Windows named-pipe name | The configured endpoint exists and matches the server’s actual socket or pipe configuration. |
For Standard TCP/IP, Workbench documents port 3306 as the default, but an installation can use a different port. Its Standard TCP/IP connection documentation also notes that localhost may resolve to 127.0.0.1 or ::1. If one address works and another does not, check which address the server listens on and whether the MySQL account permits connections from that host.
For local connections, Workbench documents /tmp/mysql.sock as the Unix socket default and MySQL as the Windows named-pipe default. These are defaults, not guarantees about a particular package or server configuration. Confirm the actual endpoint in the server’s settings before entering it. See the Local Socket/Pipe connection documentation.
Troubleshoot a Standard TCP/IP connection
- Open the saved connection’s settings in Workbench and confirm its method is Standard TCP/IP.
- Check the host and port against the server’s listening configuration. Use
3306only if that is the port the server actually uses. - If the host is
localhost, compare loopback addresses. Try127.0.0.1as a diagnostic comparison and account for possible resolution to::1. A difference can indicate a listener or account-host mismatch; neither address is universally correct. - Check the server’s network settings. MySQL’s
skip_networkingoption disables TCP/IP connections. Abind_addresssetting of127.0.0.1limits listening to IPv4 loopback. Make sure the configuration fits the address Workbench is using. - Check firewall rules if the server is running and the endpoint appears correct but the connection is still refused or blocked.
- Use Workbench’s Test Connection and read the reported error and encryption details. Change a setting only when it matches the server’s actual configuration.
MySQL explains network-listener causes in its connection troubleshooting page. A local-only connection still depends on the server listening through the selected transport.
Troubleshoot a socket or named-pipe connection
If the saved connection uses Local Socket/Pipe, confirm the configured file path on Unix-like systems or pipe name on Windows against the server’s settings. A path that matches Workbench’s documented default may still be wrong for your installation. If you instead intend to use TCP/IP, change the connection method and enter the server’s actual host and port rather than trying to repair a socket path.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Fix “Access denied” after the server responds
An “Access denied” response means the request reached MySQL far enough for the server to reject the account or authentication. Check the username and password, authentication configuration, and the account’s host permissions. The account may be permitted from one host representation but not another, such as a difference between a loopback address and a name that resolves to it. The exact account and grant configuration cannot be inferred from the error title alone.
If it still will not connect
For a targeted diagnosis, gather the operating system, MySQL Server and Workbench versions, installation method, connection method, host, port or socket/pipe endpoint, and the complete error text. These details determine which service controls and configuration files apply; there is no single service command or endpoint that is correct for every installation. Workbench’s system requirements are also relevant if the client itself is not functioning as expected.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




