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.
- 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.
Creating a database is only the first part, you will need to create a user and assign permissions or privilages 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 to MySQL users in the top right corner of the page,
- Enter a username in 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.
- 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.
Privileges are determine how a user is able to connect or function with the database. A good example is that, without any privilage the user cannot add nor delete information in the database.
How to assign privileges to database user:
- Login to cPanel.
- Click on MySQL databases under databases,
- Select a users 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 privilage you wish to assign to the user or select ALL PRIVILAGES from the MySQL Account Maintenance Screen.
- Click on the Make Changes.
- 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.