guides Connecting to a database

Connecting to a database

What to enter on the connection screen, and the default users and passwords for each engine and OS.

After you sign in to socAdmin, you connect to a database server by entering its address and credentials. Each socAdmin user enters their own credentials. They are stored encrypted, only for that user.

Connection fields

Field What to enter
Engine MySQL / MariaDB, PostgreSQL or MongoDB
Host localhost for a database on the same machine, a Compose service name such as mysql, or a hostname
Port 3306 for MySQL, 5432 for PostgreSQL, 27017 for MongoDB
User and password A database user, not your socAdmin account

Default credentials

The user and password of a fresh install depend on the engine, the OS and how it was installed. If you installed the engine through socAdmin Manager, these are the values to use.

MySQL / MariaDB

OS User Password
macOS (Homebrew) root none, leave it empty
Linux (apt / dnf) root set during install
Windows (installer) root set during install

PostgreSQL

OS User Password
macOS (Homebrew) your macOS username none, leave it empty
Linux (apt / dnf) postgres not set, see below
Windows (installer) postgres set during install

On Linux, the postgres user has no password and can only sign in locally through the system account. Give it a password before connecting from socAdmin:

sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'choose-a-password';"

MongoDB

OS User Password
All platforms none none

MongoDB has no authentication enabled by default. Leave the user and password empty.

Pre-configured connections

On Docker, you can set MYSQL_HOST, POSTGRES_HOST or MONGO_HOST (plus port, user and password) so the connection is filled in for everyone. The full list is in Environment variables.

If the connection fails

  • Connection refused: the engine isn’t running, or it listens on another port. Start it from the Manager or check the port.
  • Access denied / authentication failed: wrong user or password. Check the table above for your OS.
  • Host blocked (Docker): you entered a private IP. Use a service name or set ALLOW_PRIVATE_NETWORKS=true.