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

# Create a MySQL database and user

> Set up a database for WordPress or another web app in cPanel.

Most web apps, such as online shops and forums, store their content in a MySQL database. This guide shows you how to create a database and a user that can access it.

> [!NOTE]
>
> Installing WordPress or another app with **WordPress Manager by Softaculous** or **Softaculous Apps Installer**? It creates the database for you, so you can skip this guide. See [Install WordPress](/wordpress/install-wordpress.md).

## Create a database with the wizard

**1. Open Database Wizard**

[Log in to cPanel](/cpanel/log-in-to-cpanel.md), type **Database Wizard** in the **Search Tools** box and open it.

**2. Name the database**

Enter a name and continue. cPanel adds your cPanel username and an underscore to the front, for example `username_shop`. Note down the full name.

**3. Create a user**

Enter a username and a strong password (or generate one), and continue. The username also gets your cPanel username in front. Save the password somewhere safe.

**4. Give the user access**

Tick **ALL PRIVILEGES** unless your app's instructions say otherwise, and continue.

## Connect your app

Enter these details in your app's setup or configuration file:

| Setting | Value |
| - | - |
| Database host | `localhost` |
| Database name | The full name, for example `username_shop` |
| Database username | The full username, for example `username_shopuser` |
| Password | The password you set for that user |

## Manage databases later

Open **Manage My Databases** in cPanel to create more databases and users, add a user to a database, change a user's password, or delete a database.

To view or edit the data inside a database, open **phpMyAdmin**.

> [!WARNING]
>
> Deleting a database permanently removes everything in it. Download a copy first with **Backup** in cPanel. See [Restore and download backups](/cpanel/take-and-restore-backups.md).

Still stuck? [Open a ticket](/support/open-a-ticket.md) with your domain name and the error your app shows.


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