MySQL, MariaDB and PostgreSQL
The three relational engines work the same way in the dashboard. By the end of this page you will have a user, a database, and a client in your lab connected to it.
1. Create a user
- Go to Services and click Manage on MySQL, MariaDB or PostgreSQL.
- Click Add User (or Create User if you have none yet).
- Fill in Username, Password and Confirm Password, then confirm.

| Field | Rules |
|---|---|
| Username | 5–16 characters: letters, digits and underscores. Not only digits, and not a reserved name such as root. |
| Password | At least 8 characters. Single quotes (') are not allowed. |
The user appears as a card on the Dashboard tab, with its password behind a copy button.
2. Create a database
- Open the Database tab.
- Choose the Username that will own it.
- Type a Database Name. It is automatically prefixed with the user's name
and an underscore, so
shopowned byalice_devbecomesalice_dev_shop. - On MySQL and MariaDB, choose a Collation (leave the default if unsure).
- Click Create Database.
The part you type must be at least 5 characters, and the full name, prefix included, at most 64. Each user can own up to 5 databases.
3. Connect from your lab
Copy the Hostname and Port from Connection Information on the service's Dashboard tab. Then, in your lab's terminal:
MySQL / MariaDB
sudo apt-get install -y mysql-client # or mariadb-client
mysql -h <host> -P <port> -u <user> -p <database>
From code, the usual connection URL is:
mysql://<user>:<password>@<host>:<port>/<database>
PostgreSQL
sudo apt-get install -y postgresql-client
psql -h <host> -p <port> -U <user> -d <database>
From code:
postgresql://<user>:<password>@<host>:<port>/<database>
Enter the password from the user's card when asked. Remember <database> is
the full, prefixed name.
Anything you apt-get install is gone after a redeploy. Add the client install
to your startup script.
Managing what you created
| Task | Where |
|---|---|
| See a user's password | Its card on the Dashboard tab |
| Drop a database | Its card on the Database tab |
| Delete a user | Delete User on its card — this also deletes every database it owns |
If it does not connect
| Symptom | Check |
|---|---|
| Access denied | The user name and password match the card exactly; you are using the prefixed database name |
| Connection times out | You are connecting from inside a lab, with the host and port from the service page. From your own computer, use the port forwarding helpers. |
| Unknown database | The database name includes the <user>_ prefix |
Do it with an AI assistant
You can also do this by asking an AI assistant connected to your account — see Connect an AI assistant to set one up.
| Ask | What the assistant does |
|---|---|
| “Create a PostgreSQL user called appsvc01” | add_service_user |
| “Create a database called orders for appsvc01” | create_database — the platform names it appsvc01_orders |
| “What databases does appsvc01 have?” | list_databases |
| “Drop appsvc01_orders” | delete_database |
An assistant cannot read back a MySQL, MariaDB or PostgreSQL password — copy it from the user's card on the service page. When creating a database, give the bare name; the platform adds the user prefix.
Next
- Databases and services — limits, port forwarding, public endpoints
- MongoDB