MySQL error 1045 (SQLSTATE 28000) means the server accepted the TCP session and then rejected the account. A desktop client often shortens that to "Access denied. Check the username and password." The full server line names a pair, as in Access denied for user 'app'@'127.0.0.1' (using password: YES). That host is the address MySQL saw for the client, not the value you typed in the Host field. In this guide we fix the pair, then retest from the connection form.
Read the 1045 line before you rotate the password
The parenthetical and the host each rule out a different mistake.
| Fragment | What it means |
|---|---|
| using password: YES | A non-empty password was sent and rejected. Wrong secret, or the right secret on a different user@host row. |
| using password: NO | The client sent an empty password. The Password field is blank, or the saved secret never loaded. |
| 'app'@'127.0.0.1' | The server looked up that pair. 'app'@'localhost' is another account, with its own password. |
| to database 'shop' | That wording is error 1044. Login succeeded. The Database field names a schema this account cannot use. |
Test connection in TabulaSQL collapses any "Access denied" text to one sentence, so the host disappears from the banner. Repeat the same host, port, user, and password with the mysql client:
mysql -u app -p -h 127.0.0.1 -P 3306
If the message names an authentication plugin, such as caching_sha2_password cannot be loaded, you are not looking at 1045. That handshake is covered in Fix MySQL 8 caching_sha2_password in a GUI. Error 2002 and "Can't connect" mean nothing accepted the session, so host matching never ran.
Why the CLI works and the GUI returns 1045
On macOS and Linux, mysql -u root -p with no -h uses the Unix socket. The server records that login as 'root'@'localhost'. TabulaSQL rewrites a Host value of localhost to 127.0.0.1 before it connects, so a missing socket file cannot show up as a failed login. The account under test is 'root'@'127.0.0.1' even when the form still displays localhost.
A stock MySQL 8 or MariaDB install often creates the admin account for localhost only. The password matches, the server is up, and 1045 still fires because the TCP row does not exist. Docker published ports and Laravel Herd show the same split. Herd port and socket setup sits in Fix Laravel Herd MySQL GUI connection.
Windows has no Unix socket, so both clients usually share one transport. A 1045 there is still a user@host miss: 'root'@'localhost' versus 'root'@'%', a LAN address, or a Password field that looks filled and is not. Paste the secret again and watch for a trailing space. The GUI field needs no shell quotes. A one-line mysql command does.
See the row the server will pick
You need one account that can already connect. The socket root login is the usual one. In the SQL editor run:
SELECT User, Host, plugin FROM mysql.user WHERE User = 'app' ORDER BY Host;
Treat every Host as a separate password. localhost, 127.0.0.1, ::1, a LAN IP, and % do not share credentials. MySQL orders candidate rows by host specificity first, then by user name. An anonymous row, ''@'localhost', can outrank 'app'@'%' for a local connection, and the password checked is the anonymous one. Confirm a named local account exists before you drop that empty user.
After a login that works, CURRENT_USER() prints the pair the server chose. It can differ from the name you typed when more than one row matches. If the error shows a raw IP and you created the account for a DNS name, check skip_name_resolve. With it on, MySQL never turns the client address into a hostname, so user@'laptop.local' will not match.
The same pairs appear in the user manager once a privileged session is open. Press Ctrl+P (Cmd+P on macOS) and choose Manage MySQL users.... You can also right-click the connection and choose Manage Users.... Each line is user@host plus the auth plugin. The dialog requires a connection that can read mysql.user. A failure there is a privilege gap on the admin account, not another 1045 on the account you wanted to inspect.
Add the missing host from the GUI
The user manager can create the row the error named. It has no password-change button. Use New user when the host is absent, and ALTER USER when the row exists and only the secret is wrong.
- Open Manage MySQL users... and click New user.
- Set User to the name in the connection form, for example app.
- Set Host to the host from the 1045 line. With SSH off, TabulaSQL's localhost rewrite means 127.0.0.1.
- Type the password you will store on the connection, then click Create.
- Select that user@host row, fill the database name, keep or edit the privilege list (the default is SELECT, INSERT, UPDATE, DELETE), and click Grant.
- Edit the connection, match Username and Password to that account, and click Test connection. Success includes the server version from SELECT VERSION().
For a row that already exists, run this in the editor and quote the host exactly:
ALTER USER 'app'@'127.0.0.1' IDENTIFIED BY 'a-new-password';
Update the Password field and test again. Saved passwords are encrypted on the machine. A blank field produces using password: NO, so retype the secret instead of trusting a placeholder. If the user@host row is missing, GRANT fails on its own. Create the row first. A fuller pass over grants is in Create a MySQL user from a desktop GUI.
When an SSH tunnel changes the client host
Enable Connect through SSH tunnel and the laptop stops being the MySQL client. OpenSSH on the server connects to the Host and Port from the connection form. With Host 127.0.0.1 and Port 3306, the database sees 'app'@'127.0.0.1'. An account created for your home address, such as 'app'@'203.0.113.10', does not match, and 1045 is the expected result. Put the public machine in SSH host, leave the database Host at 127.0.0.1, and create the loopback account on that server. Opening port 3306 in the firewall does not repair a host mismatch. Tunnel setup is in Connect a MySQL GUI to a VPS without opening 3306.
If every account returns 1045, including local socket root, stop retrying from the GUI. Use the host console and that machine's admin recovery, then come back to Test connection. TabulaSQL can list those user@host rows from the open connection: https://tabulasql.com/download. Workbench, DBeaver, and the mysql CLI raise the same 1045 when that row is missing.