Knowledgebase

Creating a MySQL Database and User Print

  • cpanel, database, password, troubleshooting, phpmyadmin, errors, guide, howto
  • 0

Most web applications need a database, a user, and that user granted access to it. All three steps are required.

THE FAST WAY - DATABASE WIZARD

  1. In cPanel open MySQL Database Wizard under Databases.
  2. Enter a database name and click Next Step. The final name is prefixed with your cPanel username, for example user_wp01.
  3. Enter a username and a strong password, then click Create User. This name is prefixed too.
  4. On the privileges screen tick ALL PRIVILEGES, then click Next Step.

Write down all three values. You will need them during installation.

THE MANUAL WAY

Use MySQL Databases if you need to attach an extra user to an existing database: Create the database under "Create New Database". Create the user under "Add New User". Attach them under "Add User To Database" and grant ALL PRIVILEGES.

NOTES

The prefix is added automatically and is not optional. Forgetting it is the single most common cause of "Error establishing a database connection". Use a different password from your cPanel password. Deleting a database is immediate and permanent. Export it from phpMyAdmin first.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot