Check Username & Password
Passwords are case-sensitive. Double-check for typos, extra spaces, or copy-paste errors.
Try logging in with the same credentials using a different tool (command line, phpMyAdmin, etc.) to confirm they work.
Getting "access denied", "authentication failed", or "login failed" errors? Here's how to troubleshoot and fix database permission issues.
# Error classification
error_class = Authentication / Authorization
layer = login (after network connection)
means = server is reachable but rejected login
# Common error codes
mysql = ERROR 1045 (28000): Access denied for user
postgres = FATAL: password authentication failed
oracle = ORA-01017: invalid username/password
fix_paths = password / grants / host-access
time_to_fix = 5 to 15 minutes
difficulty = Beginner
// see solutions below; database-specific fixes follow
The connection worked, but login failed.
Unlike "connection refused" (can't reach the server), "access denied" means SQL Developer successfully connected to the database server, but the server rejected your login. This happens when:
Three common causes, each with a specific fix.
Passwords are case-sensitive. Double-check for typos, extra spaces, or copy-paste errors.
Try logging in with the same credentials using a different tool (command line, phpMyAdmin, etc.) to confirm they work.
Many database users are restricted to specific client hosts. To see what your user is allowed from, run this query from any working client:
MySQL/MariaDB: SELECT user, host FROM mysql.user WHERE user='YOUR_USER'; — if host is localhost, you cannot connect from another machine. Fix: ask your DBA to recreate as 'YOUR_USER'@'%' or pin to your IP 'YOUR_USER'@'192.168.x.x'.
PostgreSQL: Restriction lives in pg_hba.conf, not the user record. Check the host lines for an entry matching your client IP.
Your user might exist but lack permission to access the specific database you're trying to connect to.
Ask your DBA to run:SHOW GRANTS FOR 'username'@'host';
Resolution commands for MySQL/MariaDB, PostgreSQL, and Oracle.
-- Reset password and grant access
ALTER USER 'username'@'%' IDENTIFIED BY 'newpassword';
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%';
FLUSH PRIVILEGES;
# Add a line to allow this user from any host
host all username 0.0.0.0/0 md5
# Then restart PostgreSQL for changes to take effect
$ sudo systemctl restart postgresql
-- Check if the account is locked
SELECT account_status FROM dba_users WHERE username = 'YOUR_USER';
-- If status is LOCKED, unlock the account
ALTER USER your_user ACCOUNT UNLOCK;
Symptoms not matching? Check these related guides.
Your DBA can read the server-side auth log and tell you exactly why the login was rejected — wrong password, wrong host, missing grant, locked account, expired credential. That's faster than guessing from the client side.
Don't have SQL Developer yet? Download free.