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

# Manage My Databases

> Create MySQL databases, add database users, and assign privileges from cPanel's full-control database tool.

The MySQL Databases tool is the full-control version of database management in cPanel. It does everything the Database Wizard does, plus rename, repair, and user privilege editing for accounts you've already created.

Open it from cPanel home → **Databases** → **MySQL Databases**.

<Frame caption="MySQL Databases page with the four sections: Create, Modify, Users, Add User to Database">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/page-light.png" alt="Manage My Databases page with all sections visible" className="block dark:hidden" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/page-dark.png" alt="Manage My Databases page with all sections visible" className="hidden dark:block" />
</Frame>

For a step-by-step walkthrough that bundles all of this into one flow, use the [Database Wizard](/web-hosting/cpanel/database-management/database-wizard) instead.

## Create a database

<Steps>
  <Step title="Type a name and click Create">
    The page opens with **Create New Database** at the top. Type a short name (`wordpress`, `shop`, `staging`). cPanel automatically prefixes it with your account username, so what gets created is `username_wordpress`.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/create-light.png" alt="Create New Database form with prefix shown" className="block dark:hidden" />

      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/create-dark.png" alt="Create New Database form with prefix shown" className="hidden dark:block" />
    </Frame>
  </Step>

  <Step title="Confirm">
    A green confirmation appears and the database shows up in **Current Databases** further down the page. It's empty. No tables yet. Use phpMyAdmin or your app's installer to populate it.
  </Step>
</Steps>

## Create a database user

A database without a user that can connect to it is read-only-by-nobody. Every app needs a user.

<Steps>
  <Step title="Scroll to MySQL Users → Add New User">
    Type a username (gets prefixed: `username_wpuser`) and a password. The **Password Generator** button creates a strong random one. Click **Use Password** to copy it back into the form.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/add-user-light.png" alt="Add New User form with password generator" className="block dark:hidden" />

      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/add-user-dark.png" alt="Add New User form with password generator" className="hidden dark:block" />
    </Frame>
  </Step>

  <Step title="Save the password somewhere safe">
    cPanel won't show the password again. Paste it into your password manager or your app's config file before you leave the page.
  </Step>

  <Step title="Click Create User">
    The user is created but isn't linked to any database yet. Next step does that.
  </Step>
</Steps>

## Link the user to the database

<Steps>
  <Step title="Scroll to Add User to Database">
    Pick the user from the first dropdown and the database from the second.
  </Step>

  <Step title="Pick privileges">
    The next page lists every MySQL privilege as a checkbox. For most web apps, click **ALL PRIVILEGES** at the top and you're done.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/privileges-light.png" alt="Manage User Privileges checklist with ALL PRIVILEGES highlighted" className="block dark:hidden" />

      <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/database-management/manage-databases/privileges-dark.png" alt="Manage User Privileges checklist with ALL PRIVILEGES highlighted" className="hidden dark:block" />
    </Frame>

    <Tip>
      Use a narrower set if you're paranoid: `SELECT, INSERT, UPDATE, DELETE` covers normal app traffic, while `CREATE, ALTER, DROP, INDEX, REFERENCES` are needed during installs and migrations. If you remove the latter group after install, future plugin updates will fail.
    </Tip>
  </Step>

  <Step title="Click Make Changes">
    The user now has the right access to the database. You can plug the credentials into your app.
  </Step>
</Steps>

## Modify an existing database

In **Modify Databases**, click into a database name to:

* **Check Database**: runs `CHECK TABLE` on every table. Fast, read-only, finds corruption.
* **Repair Database**: runs `REPAIR TABLE` on tables that need it. Only works on MyISAM/Aria. InnoDB tables are repaired by the engine itself; this button is a no-op for them.
* **Rename Database**: changes the name. Watch out, any app config pointing at the old name will break the second you rename.

## Modify users

In **Current Users**, the action column lets you:

* **Change Password**: resets the password. Update your app config with the new one.
* **Rename**: changes the username. Your app's config needs the new name.
* **Delete**: removes the user. The database isn't deleted, only the user that was connecting to it.

<Warning>
  Renaming or deleting a database/user the live site is using will take the site down until the config is updated. Take a [JetBackup](/web-hosting/cpanel/file-management/jetbackup) snapshot first if it's a production database.
</Warning>

## Common issues

<AccordionGroup>
  <Accordion title="The database name field rejects my input">
    The full prefixed name (`username_yourname`) has a 64-character limit. If you have a long account username, you only have a few characters left for the database name. Use a short suffix like `wp` or `db1`.
  </Accordion>

  <Accordion title="My app says 'Access denied for user'">
    Three things to check, in order: the user exists in **Current Users**; the user is linked to the database (`Privileged Users` column on the database row should show the user); and the password you typed into the app config matches what you set when creating the user. The "I forget the password" tell is the user existing but not being on the database.
  </Accordion>

  <Accordion title="I deleted the wrong database">
    Restore it from your nightly [JetBackup](/web-hosting/cpanel/file-management/jetbackup) snapshot. Go to **Database Backups**, find the database name, click **Restore**.
  </Accordion>
</AccordionGroup>

## Next

<CardGroup cols={2}>
  <Card title="Run SQL against the database" icon="terminal" href="/web-hosting/cpanel/database-management/phpmyadmin/sql">
    phpMyAdmin's SQL tab is where you'd run queries.
  </Card>

  <Card title="Connect from your laptop" icon="network-wired" href="/web-hosting/cpanel/database-management/remote-database-access">
    Whitelist your IP for external MySQL connections.
  </Card>
</CardGroup>

## Need a hand?

<CardGroup cols={2}>
  <Card title="Open a ticket" icon="life-ring" href="https://members.noxity.io/submitticket.php">
    Best for anything that needs an account check or a config change on our end.
  </Card>

  <Card title="Live chat" icon="messages" href="https://noxity.io/contact">
    Faster for quick questions during business hours.
  </Card>
</CardGroup>
