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

# Creating a MySQL or PostgreSQL Database

Plesk supports both MySQL and PostgreSQL databases. You can create and manage databases directly from the Plesk dashboard.

## Creating a Database

**1. Go to Databases**

Log in to Plesk and click **Databases** in the left sidebar.

**2. Add a Database**

Click **Add Database**.

**3. Fill in the Details**

* **Database name** — enter a name for your database
* **Database type** — select **MySQL** or **PostgreSQL**
* **Related site** — select the domain this database is associated with

**4. Create a Database User**

Under **Add a new database user**, enter a username and a strong password. This user will be used by your application to connect to the database.

**5. Confirm**

Click **OK**. The database and user are created.

## Connection Details

Use the following details to connect your application to the database:

| Setting | Value |
| - | - |
| **Host** | `localhost` |
| **Database name** | As entered above |
| **Username** | As entered above |
| **Password** | As entered above |
| **MySQL Port** | `3306` |
| **PostgreSQL Port** | `5432` |

> [!NOTE]
>
> Always use `localhost` as the database host when connecting from an application on the same hosting account. External database connections are not permitted on shared hosting.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.