The standard procedure.
THE STEPS
- cPanel > MySQL Databases.
- Under Create New Database, enter a name. Keep it short and descriptive.
- Create Database.
- Under MySQL Users, create a user with a strong password. Use the password generator and save it immediately.
- Under Add User To Database, select the user and the database, and add.
- On the privileges screen, tick ALL PRIVILEGES and make the changes.
THE PREFIX
Both names receive your cPanel username and an underscore automatically.
The full name is what the application needs. Copy it from the list rather than typing it.
NAMING
Descriptive, so you know which site it belongs to later. shop, blog, crm rather than db1, db2.
With several sites, this saves real confusion.
THE PASSWORD
Generate it. A database password is never typed by a human after configuration, so there is no reason for it to be memorable.
Record it with the site's documentation.
STEP FIVE IS THE ONE PEOPLE MISS
A database and a user both existing does not mean the user can access it. The assignment is separate.