Create databases, users and privileges
Create a MySQL database, attach a user and grant only the privileges the application needs.
Where Websites โ your website โ Databases
What this is for
- Create a database with the assigned prefix.
- Create or select a database user.
- Control granular or full privileges.
Before you start
- Choose a clear database and user suffix and prepare a password manager.
- Know whether the application needs all privileges or only specific database actions.
Take care
Database deletion and restore can cause permanent data loss. Verify backups and application credentials first.
Steps
-
1
Open Databases and select Add database.
-
2
Enter the database suffix; note the complete generated database name.
-
3
Create a new user or select an existing user.
-
4
Generate a strong password and store it in the application's secret configuration.
-
5
Grant only the privileges required, or use all privileges when the application installer requires them.
-
6
Save and test the connection from the application.
Check it worked
- The database and its user appear in the list with the intended privileges.
- The application connects successfully using the complete generated names and saved password.
What the controls do
| Control | What it means |
|---|---|
| Database prefix | The website-specific prefix automatically added to the name. |
| Authentication plugin | The MySQL authentication method used by the account. |
| Privileges | The database actions the selected user may perform. |