Skip to main content
SQL Developer — help/access-denied.md
auth · authentication

SQL Developer Access Denied — How to Fix

Getting "access denied", "authentication failed", or "login failed" errors? Here's how to troubleshoot and fix database permission issues.

~/errors/access-denied.spec diagnosis

# 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

What "Access Denied" Means

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:

  • Wrong username or password
  • User doesn't exist
  • User isn't allowed to connect from your IP address
  • User lacks permission to access the specific database
  • Account is locked or expired

How to Fix It

Three common causes, each with a specific fix.

STEP_01

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.

STEP_02

Check Host Restrictions

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.

STEP_03

Verify Database Privileges

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';

Database-Specific Fixes

Resolution commands for MySQL/MariaDB, PostgreSQL, and Oracle.

~/fixes/mysql.sqlMySQL / MariaDB

-- Reset password and grant access

ALTER USER 'username'@'%' IDENTIFIED BY 'newpassword';

GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%';

FLUSH PRIVILEGES;

~/fixes/postgresql.confPostgreSQL — pg_hba.conf

# 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

~/fixes/oracle.sqlOracle

-- 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;

Related Errors

Symptoms not matching? Check these related guides.

~/downloads ready.sh

Still Getting Access Denied?

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.

// responseWithin 24h, Mon–Fri
Contact Support