First of all, you need to login to your website Control Panel, example: http://yourwebsite.com/cpanel . You will need to have a cPanel username and the password, ask to your webhosting provider if you don't have it yet!
Create a MySQL Database
- Log into cPanel.
- Under Databases, click MySQL Databases.
- In the New Database field, type a name for the database.
- Click Create Database.
- Click Go Back.
- The new database will appear in the Current Databases table.
Create a Database User
After creating the database, you will need to create a user and assign privileges. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.
- Log into cPanel.
- Under Databases, click MySQL Databases.
- Click Jump to MySQL Users in the top-right corner of the page.
- Under Add New User, enter a username.
- Enter a password in the Password field.
For help generating a strong password, click the Generate Password button.
- Retype the password in the Password (Again) field.
- Click Create User.
Assign Privileges to Database User
- Log into cPanel.
- Under Databases, click MySQL Databases.
- Under Add User to Database, select a user from the User drop-down menu.
- From the Database drop-down menu, select the database to which you wish to allow the user access.
- Click Add.
- From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
- Click Make Changes.
Unassign a User from a Database
- Navigate to the Current Databases section of MySQL Databases.
- Locate the database you wish to modify.
- In the Users column for that database, click the X next to the user you wish to delete.
Delete a MySQL Database
- Navigate to the Current Databases section of MySQL Databases.
- In the Actions column of the table, click Delete Database next to the database you wish to delete.
Delete a Database User
- Navigate to the Current Users section of MySQL Databases.
- In the Delete column, click the X next to the user you wish to delete.