🚀   Portable does more than just ELT. Explore Our AI Orchestration Capabilities 

Troubleshooting Database Credentials

Sergio
CTO

After establishing a network connection to your database, Portable attempts to authenticate with the username and password you provided. If this step fails, you'll see a "Database Authentication" or "User Credentials" error in the diagnostic checks.

What This Means

Portable can reach your database server, but the login credentials are being rejected. The username doesn't exist, the password is wrong, or the user isn't allowed to connect from Portable's IP address.

Common Causes

1. Incorrect Password

The most common cause. Database passwords are case-sensitive and must match exactly.

Common mistakes:

  • Copy/paste errors (extra whitespace, missing characters)
  • Using an old/rotated password
  • Confusing the database password with an application or SSH password

2. Incorrect Username

The username must match exactly what's configured in the database.

Common mistakes:

  • Case sensitivity (PostgreSQL usernames are case-sensitive when quoted)
  • Using an email address instead of the database username
  • Forgetting the domain prefix (e.g., myuser vs mydomain\myuser for SQL Server)

3. User Doesn't Exist

The user account may not have been created in the database, or was created in a different database/schema.

4. Host-Based Access Restrictions

Many databases restrict which hosts a user can connect from. Even with correct credentials, the connection will be rejected if Portable's IP (34.122.15.109) isn't allowed.

PostgreSQL uses pg_hba.conf to control access:

# Allow connections from specific IP
host    all    myuser    34.122.15.109/24    md5

MySQL ties permissions to host:

-- User can only connect from localhost
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'password';

-- User can connect from anywhere
CREATE USER 'myuser'@'%' IDENTIFIED BY 'password';

5. Authentication Method Mismatch

PostgreSQL supports multiple authentication methods (md5, scram-sha-256, password, etc.). If the server requires a method that Portable doesn't support for your configuration, authentication will fail.

6. Account Locked or Expired

The user account may be locked due to too many failed attempts, or the password may have expired.

How to Diagnose

Test credentials locally

PostgreSQL:

psql -h db.example.com -U myuser -d mydb
# Enter password when prompted

MySQL:

mysql -h db.example.com -u myuser -p mydb
# Enter password when prompted

If this works from your machine, the credentials are correct. The issue is likely host-based access restrictions.

Check if user exists

PostgreSQL:

SELECT usename FROM pg_user WHERE usename = 'myuser';

MySQL:

SELECT user, host FROM mysql.user WHERE user = 'myuser';

Check host restrictions

PostgreSQL - Review pg_hba.conf:

# Location varies by installation
cat /etc/postgresql/*/main/pg_hba.conf
# or
SHOW hba_file;  -- Run in psql to find location

MySQL - Check user's allowed hosts:

SELECT user, host FROM mysql.user WHERE user = 'myuser';
-- '%' means any host
-- 'localhost' means local connections only
-- Specific IP/hostname restricts to that address

Check for account issues

PostgreSQL:

SELECT usename, valuntil FROM pg_user WHERE usename = 'myuser';
-- valuntil shows password expiration (NULL = never expires)

MySQL:

SELECT user, account_locked, password_expired
FROM mysql.user
WHERE user = 'myuser';

Cloud-Specific Instructions

AWS RDS

  1. Master credentials are set during instance creation
  2. To create additional users, connect as the master user:
    CREATE USER myuser WITH PASSWORD 'securepassword';
    GRANT CONNECT ON DATABASE mydb TO myuser;
    
  3. RDS doesn't use pg_hba.conf - access is controlled via Security Groups

Google Cloud SQL

  1. Users are managed in Cloud Console → SQL → Users
  2. Or create via SQL:
    CREATE USER myuser WITH PASSWORD 'securepassword';
    
  3. Ensure the Authorized Networks include Portable's IP addresses

Azure Database

  1. Admin credentials are set during server creation
  2. Create users via the Azure portal or SQL:
    CREATE USER myuser WITH PASSWORD = 'securepassword';
    
  3. Configure firewall rules in Networking settings

DigitalOcean Managed Databases

  1. Default user credentials are shown in the dashboard
  2. Create additional users in Users & Databases tab
  3. Add Portable's IPs to Trusted Sources

Creating a User for Portable

Here's how to create a dedicated user with appropriate permissions:

PostgreSQL (Source - read-only):

CREATE USER portable_reader WITH PASSWORD 'secure_password_here';
GRANT CONNECT ON DATABASE mydb TO portable_reader;
GRANT USAGE ON SCHEMA public TO portable_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO portable_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO portable_reader;

PostgreSQL (Destination - read-write):

CREATE USER portable_writer WITH PASSWORD 'secure_password_here';
GRANT CONNECT ON DATABASE mydb TO portable_writer;
GRANT USAGE, CREATE ON SCHEMA public TO portable_writer;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO portable_writer;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO portable_writer;

MySQL (Source - read-only):

CREATE USER 'portable_reader'@'%' IDENTIFIED BY 'secure_password_here';
GRANT SELECT ON mydb.* TO 'portable_reader'@'%';
FLUSH PRIVILEGES;

MySQL (Destination - read-write):

CREATE USER 'portable_writer'@'%' IDENTIFIED BY 'secure_password_here';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP ON mydb.* TO 'portable_writer'@'%';
FLUSH PRIVILEGES;

Checklist

Before contacting support, verify:

  • Username is spelled correctly (case-sensitive)
  • Password is correct (no extra whitespace from copy/paste)
  • User exists in the database
  • User is allowed to connect from any host ('%' in MySQL, appropriate pg_hba.conf entry in PostgreSQL)
  • Account is not locked or expired
  • You can connect with the same credentials from a local client
  • Portable's IP addresses are whitelisted (for cloud databases)

Still Stuck?

If you can connect locally but Portable can't authenticate, contact support with:

  • Your database type (PostgreSQL, MySQL)
  • The exact username you're using
  • Whether you're using a cloud provider
  • The output of the user/host check queries above
  • Your source/destination ID from Portable