cPanel offers a simple and easy method for managing MySQL databases. MySQL databases store large amounts of information over the web easily and are necessary to run many web-based applications such as WordPress, Joomla, Drupal, and most popular forums and online retail shops.
How to create a MySQL database:
- Login to cPanel,
- Click on MySQL Databases under the database group,
- Type the name of the database in the new database field,
- Click on Create Database,
- Click on Go Back to return to the previous page and your new database will appear in the Current Database table.
How to delete a MySQL database:
- Go to the Current Database section of the MySQL Databases,
- Click Delete Database in the action column of the table next to the database you wish to delete.
How to create or delete a database user
Creating a database is only the first part, you will need to create a user and assign permissions or privileges to make it function. A good thing to note is that MySQL user accounts should be created separately from mail and web admin accounts.
How to create a database user:
- Once logged in cPanel, click on MySQL databases,
- Click on MySQL users in the top right corner of the page,
- Enter a username the under Add New User form. Make sure that the username is 7 characters or shorter,
- Enter a password in the password field (or you can use a strong password via the password generator) and retype the password again in the retype field,
- Click on Create User.
Deleting a database user:
- Still, inside MySQL Databases page, go to the Current User group,
- Click the x button next to the user you wish to delete found in the delete column.
How to define a user's privileges.
Privileges determine how a user can connect or function with the database. A good example is that without any privilege the user cannot add or delete information in the database.
How to assign privileges to a database user:
- Login to cPanel.
- Click on MySQL databases under databases,
- Select a user from the user drop-down menu under Add User to the database,
- Select the database to which you wish to add user access from the database drop-down menu,
- Click Add.
- Select the privilege you wish to assign to the user or select ALL PRIVILEGES from the MySQL Account Maintenance Screen.
- Click on the Make Changes.
How to remove a user from a database:
- Go to the current database section of MySQL Databases,
- Find the database you wish to modify,
- Within the user column for that database, click the x button next to the user you wish to delete.
You can also view the MySQL video tutorial by cPanel, by clicking the link below:
https://www.cpanel.net/media/tutorials/addmysql.htm