cPanel provides a centralized interface for creating and maintaining MySQL databases, database users, and access permissions. Proper database management is essential for application stability, beveiliging, en prestaties.
These features are available on standard cPanel-hosting environments.
Managing database users
Database users authenticate applications and control access to data. Create users before assigning them to databases.
Creating a database user
- Log in op cPanel.
- Open the Hulpmiddelen pagina.
- In the Databases sectie, klik Manage My Databases.
- Under Add New User, enter a username.
- Set and confirm a strong password or use the password generator.
- Klik Create User.
[Screenshot placeholder: Add New MySQL User]
Changing a user password
- Open Manage My Databases.
- Under Current Users, locate the user.
- Klik Change Password.
- Set and confirm the new password.
- Sla de wijzigingen op.
Update application configuration files to match the new credentials.
Renaming a user
- Open Manage My Databases.
- Under Current Users, klik Rename next to the user.
- Enter the new name and proceed.
Deleting a user
Deleting a user removes all database privileges for that user.
- Open Manage My Databases.
- Under Current Users, klik Verwijderen.
- Confirm the deletion.
Ensure no applications rely on the user before removal.
Databases beheren
After creating users, create databases and assign appropriate privileges.
Creating a database
- Open Manage My Databases.
- Under Create New Database, enter a database name.
- Klik Create Database.
Database names are automatically prefixed with your account username.
Adding a user to a database
- Under Add User to Database, select a user.
- Select the target database.
- Klik Toevoegen.
- Assign specific privileges or select ALL PRIVILEGES.
- Klik Make Changes.
[Screenshot placeholder: Assign User Privileges]
Checking and repairing a database
- Under Modify Databases, select a database in Check Database.
- Klik Check Database.
- If issues are found, select the database under Repair Database.
- Klik Repair Database.
Revoking user privileges
- Under Current Databases, locate the database.
- Click the remove icon next to the user.
- Confirm Revoke User Privileges from Database.
Deleting a database
Deleting a database permanently removes its data.
- Open Manage My Databases.
- Under Current Databases, klik Verwijderen next to the database.
- Confirm the deletion.
Create a backup before deletion if data retention is required.
Scaling and operational considerations
For applications with higher load, larger datasets, or custom backup strategies, environments such as cloud-servers or a speciale server provide greater control over database performance, access, and recovery options.
