> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shipways.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases

> The engine on a server, its databases, and who can reach them.

Databases live on the server's **Databases** tab, and only on a
[type that hosts them](/servers/types) — application or database.

## Installing an engine

One engine per machine, chosen when you install it:

* **MySQL 8**, listening on 3306.
* **PostgreSQL 16**, listening on 5432.

Neither port is opened to the internet. An application server on another
machine reaches the database over the
[private connection](/servers/settings#private-connections), not through the
public firewall.

## Databases and users

A **database** is a database. A **user** is an account, and an account can
reach any number of databases, or none yet.

They are separate because sharing is ordinary rather than a mistake: a staging
site beside the live one, an admin panel beside what it administers, a monolith
served on two vhosts. Each site connects as **its own account**, so one can be
shut out later without touching the other.

Grants are applied as a whole. Whatever is ticked when you save is what the
account can reach — anything unticked is revoked.

## Passwords

Shipways generates the password and keeps it, encrypted, so it can put it back
if a site's [environment file](/sites/environment) is ever rebuilt.

It is not shown in the panel. Rotating the user is how you get a value you can
read, and doing so means updating anything that was using the old one.

**Connect as** builds a connection string for a chosen account, and can open it
in a desktop database client. The password is hidden on screen but included in
what is copied — it is the same password the site's environment file holds.

## Naming a site when you create a database

Creating a database with a site named writes the credentials straight into that
site's environment file, so there is nothing to copy across.

That only works cleanly on a site that has not been deployed yet, because the
environment file is [seeded once](/sites/environment#where-the-first-one-comes-from)
and never touched again afterwards.

## Removing one

Dropping a database drops it. There is no undo beyond a
[backup](/backups), which is the argument for having one.

Removing a [site](/sites/creating) never touches a database. Its files and
certificate go, and any process running for it stops, but the data stays.
