First, read the error
The wording of the error decides where you look first.
- Error 2003 (10061) means the network connection was refused. MySQL's manual, as quoted on a community Q&A thread, says this means the network connection has been refused, so you should check that a MySQL server is running, that it has network connections enabled, and that the port you specified is the one configured on the server. Windows error 10061 is the socket-level "connection refused" code. The 10061 is the Windows socket error code, and it translates to "Connection refused."
- "Access denied for user" is a different problem. The client reached a server, and the server rejected the login. MySQL's connection troubleshooting guide describes this as a wrong password or an account that doesn't match. Check the account name, the password and the account's host permissions, and leave services and ports alone.
If you see 2003, work through the checks below. If you see "Access denied", skip to step 5 and fix the credentials.
1. Confirm the server exists and the service is running
Workbench is only the client. MySQL's manual describes it as the tool that manages the MySQL server and edits SQL statements, and it needs a running server to talk to. Installing Workbench alone does not give you a database engine.
- Press Windows + R, type
services.mscand press Enter. - Look for a MySQL service. Common names are
MySQL80andMySQL84, but the name depends on your version and how you configured the server, so look for the service that matches your install. - If it is stopped, right-click it and choose Start. If it is already running, Restart is a reasonable retry.
- Optionally, open Properties and set Startup type to Automatic. This only controls whether the service starts with Windows. It isn't needed to get a connection working right now.
- Retry the connection in Workbench.
If no MySQL service appears, the server may not be installed, or it may be installed but not configured. MySQL's Windows documentation says that when you use the MSI, the server won't start until it's configured. It recommends running the bundled MySQL Configurator right after the installer. The same documentation says that MySQL Configurator sets up the server as a Windows service by default.
2. Check the Workbench connection profile
Right-click your connection, choose Edit Connection and check these fields:
- Connection Method: Standard (TCP/IP).
- Hostname: the server's host name or IP address. Try
127.0.0.1iflocalhostfails. - Port: 3306 is the default, but your server may use another port. The Workbench manual describes this field as the TCP/IP port on which the MySQL server is listening, with 3306 as the default.
- Username: use the account you actually created.
rootis common, but it is not required.
Why try 127.0.0.1? The Workbench manual warns that the host name "localhost" might resolve to "127.0.0.1" or "::1", which are IPv4 and IPv6 loopback. Pinning the address removes that ambiguity. It is a useful diagnostic step, not a guaranteed fix. If your account or server is set up for a particular address, the profile has to match it.
Click Test Connection and enter your password when prompted.
3. Check what is listening on the port
Open an elevated Command Prompt and run:
netstat -ano | findstr :3306
If a line shows LISTENING, note the PID at the end and identify the process:
tasklist /FI "PID eq 1234"
Replace 1234 with your PID. Interpret the result carefully:
- A MySQL process (
mysqld.exe) is listening: the server side looks healthy. Go back to the profile and the credentials. - A different program is listening: you have a port conflict. Stop that program, or move MySQL to another port and update Workbench to match.
- Nothing is listening: the server is stopped, listening on a different port, or not accepting TCP/IP connections. The Workbench manual notes that the skip_networking system variable affects the TCP/IP connection method.
Seeing something on 3306 does not prove it is the right MySQL instance or that your login will work. If you run several MySQL versions side by side, they may each use a different port.
4. Inspect the option file, but only if the earlier checks point to it
On Windows the server reads an option file called my.ini. MySQL's 8.4 manual says MySQL Configurator installs my.ini under C:\ProgramData\MySQL\MySQL Server 8.4\ by default. However, the same manual's layout table places log files and databases under %PROGRAMDATA%\MySQL\MySQL Server 8.4\, and C:\ProgramData is hidden by default. Installs can also differ, so go to the file your service actually uses rather than assuming one path.
Once you've found it, check the [mysqld] section:
- Does
portmatch what Workbench uses? - Is
bind-addressset to something that rules out your connection? MySQL documents that when bind_address is set to 127.0.0.1, the server listens for TCP/IP connections only on the local loopback interface and does not accept remote connections. That is fine for a purely local server. Don't widen it without a reason, because doing so changes who can reach your database. - Is
skip_networkingenabled? If so, TCP/IP connections are refused.
Edit the file in a text editor run as administrator, save, then restart the MySQL service. Make a copy of the file first.
5. Test outside Workbench
A command-line test shows whether the fault is in Workbench or in the server:
mysql -h 127.0.0.1 -P 3306 -u root -p
Adjust the host, port and user to match your setup. If Windows doesn't recognize mysql, run it from the server's bin folder. MySQL notes the default MSI location for 8.4 is C:\Program Files\MySQL\MySQL Server 8.4, or you can add that bin folder to your PATH.
Read the result:
| Result | What it suggests | Next step |
|---|---|---|
| Connects | The server is fine; the Workbench profile or saved credentials are wrong | Recheck the profile and stored password |
| Access denied | The server was reached; the login failed | Verify the username, the password and any option files with stored credentials |
| Can't connect to MySQL server | The server isn't reachable at that host and port | Return to steps 1 to 4 |
A stale password in an option file can cause confusing "Access denied" errors. MySQL's guide says that if the error occurs even when you haven't typed a password, an incorrect password may be listed in some option file.
6. Check the error log, then repair or reconfigure
If the service refuses to start, don't reinstall straight away. MySQL's Windows troubleshooting page says the first thing to read is the error log: your first resource when troubleshooting server issues is the error log, and it sits in the data directory specified in your my.ini. The same page says you can run SC START or NET START with the service name from the command line to see service start-up messages.
The manual also lists common causes of start-up failure:
- Base or data directories in non-default locations, for example after an upgrade where the configuration file was not updated, or where old and new configuration files conflict.
- A service name clash when you reinstall without removing the old service. The documented fix is to pick a different service name, or to remove the stale one with
SC DELETE mysqlfrom an elevated prompt.
If you do reconfigure, MySQL Configurator is the supported tool. The manual says it can both configure and reconfigure the MySQL server. You can start it from the Start menu, or run mysql-configurator.exe from the server's bin folder.
Be careful with the data directory. MySQL warns that if you change the datadir value, you must move the contents of the existing data directory before restarting the server. Back up your databases before any major change.
One more suspect: the firewall
Windows Firewall is a less common cause on a pure localhost setup, but third-party security software sometimes interferes. MySQL's guide says that under Windows, applications such as ZoneAlarm or Windows Firewall may need to be configured not to block the MySQL port. This matters most if you are connecting from another machine or through a non-default port.
Summary
- A 2003 (10061) error means the connection was refused: check the service, the port and the host first.
- "Access denied" means you reached the server: fix the credentials.
- 3306 is the default port, not a guarantee.
rootis only one possible account.localhostcan resolve to IPv4 or IPv6.- Read the error log and back up your data before you reconfigure or reinstall.
Most localhost failures turn out to be a stopped service or a port mismatch. The more drastic fixes are rarely needed.
Correction (November 17, 2026): An earlier version of this article said MySQL's 8.4 manual states the installer creates my.ini in the base installation directory. The manual actually says MySQL Configurator installs my.ini under C:\ProgramData\MySQL\MySQL Server 8.4\ by default; the base installation directory is one of the other locations MySQL reads for option files, not where the installer puts it.
References
- MySQL Workbench Can’t Connect to Localhost? 6 Ways to Fix It Windows Report · 2026-11-17T09:41:14+00:00
- Solved: ERROR 2003: Can't connect to MySQL server on 'localhost' (10061) experts-exchange.com
- mysql error 2003 cant connect to mysql server on localhost 3306 10061 4ca9123536b4 pythologer.medium.com