Colonel Serveur

cPanel provides a centralized interface for creating and maintaining MySQL databases, database users, and access permissions. Proper database management is essential for application stability, sécurité, et performances.

Ces fonctionnalités sont disponibles en standard Hébergement cPanel environnements.

Managing database users

Database users authenticate applications and control access to data. Create users before assigning them to databases.

Creating a database user

  1. Connectez-vous à cPanel.
  2. Ouvrez le Outils page.
  3. Dans le Bases de données section, cliquez Manage My Databases.
  4. Sous Add New User, enter a username.
  5. Set and confirm a strong password or use the password generator.
  6. Cliquez Create User.

[Espace réservé pour la capture d'écran: Add New MySQL User]

Changing a user password

  1. Ouvrir Manage My Databases.
  2. Sous Current Users, locate the user.
  3. Cliquez Change Password.
  4. Set and confirm the new password.
  5. Enregistrez les modifications.

Update application configuration files to match the new credentials.

Renaming a user

  1. Ouvrir Manage My Databases.
  2. Sous Current Users, cliquez Rename next to the user.
  3. Enter the new name and proceed.

Deleting a user

Deleting a user removes all database privileges for that user.

  1. Ouvrir Manage My Databases.
  2. Sous Current Users, cliquez Supprimer.
  3. Confirm the deletion.

Ensure no applications rely on the user before removal.

Managing databases

After creating users, create databases and assign appropriate privileges.

Creating a database

  1. Ouvrir Manage My Databases.
  2. Sous Create New Database, enter a database name.
  3. Cliquez Create Database.

Database names are automatically prefixed with your account username.

Adding a user to a database

  1. Sous Add User to Database, select a user.
  2. Select the target database.
  3. Cliquez Add.
  4. Assign specific privileges or select ALL PRIVILEGES.
  5. Cliquez Make Changes.

[Espace réservé pour la capture d'écran: Assign User Privileges]

Checking and repairing a database

  1. Sous Modify Databases, select a database in Check Database.
  2. Cliquez Check Database.
  3. If issues are found, select the database under Repair Database.
  4. Cliquez Repair Database.

Revoking user privileges

  1. Sous Current Databases, locate the database.
  2. Click the remove icon next to the user.
  3. Confirmer Revoke User Privileges from Database.

Deleting a database

Deleting a database permanently removes its data.

  1. Ouvrir Manage My Databases.
  2. Sous Current Databases, cliquez Supprimer next to the database.
  3. 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 serveurs cloud ou un serveur dédié provide greater control over database performance, accéder, and recovery options.

Cet article a-t-il été utile?