Create a database and give a user access
A working application needs a database, a database user and the right privileges.
Where Tools → Databases → Database Wizard / Manage My Databases
Before you start
- Know the database engine and permissions required by your application.
- Keep the database password private and use a separate user for each application where practical.
Steps
-
1
Create the database user on the next step with a strong unique password. Record the full prefixed username and database name.
-
2
Assign the required privileges. Use All Privileges only when the application needs full control of its own database, not access to unrelated databases.
-
3
For manual setup, Create Database and Create User are separate sections. After both exist, use Add User to Database and save the appropriate privileges. Creating a user alone does not grant access.
-
4
Put the full names, password and provider-supplied database host into the application’s private configuration. Do not publish those details.
-
5
For guided setup, open Database Wizard. Enter a short New Database name and note any account prefix cPanel adds. Click Next Step.
The wizard starts with the database name; user and privilege steps follow. -
6
Finish the wizard. In Manage My Databases, confirm the database and assigned user are present.
Manage My Databases provides the manual controls and current database list.
Check it worked
- Confirm the user is associated with the intended database.
- Test the application’s connection and a normal page. For access-denied errors, check prefix, password, host and grants.