Watch this video to find out how you can create a MySQL database user in cPanel.
To create a database from the MySQL Databases Icon.
1. Log into the cPanel.
2. Click the MySQL Databases icon under the “Databases” category.
3. In the New Database field, type a name for the database.
4. Click Create Database.
5. Click Go Back.
The new database will appear in the Current Databases table.
Create a Database User
After creating the database, a user will need to be created and their privileges added to the newly created database. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.
To create a new user account:
1. To quickly access the MySQL Users interface, click Jump to MySQL Users.
2. Under Add New User, enter a username.
[Note: The username must be 7 letters or shorter.]
3. Enter a password in the Password field.
[For help generating a strong password, click the Generate Password button.]
4. Retype the password in the Password (Again) field.
5. Click Create User.
Define a User’s Privileges
Privileges define how the user is able to interact with the database. For example, they will determine whether or not the user can add and delete information.
To define a user’s privileges:
1. Under Add User to Database, select a user from the User drop-down menu.
2. From the Database drop-down menu, select the database to which you wish to allow the user access.
3. Click Add.
4. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
5. Click Make Changes.
After doing all these steps, create the database’s tables either via phpMyAdmin, MySQL software or use an online PHP or Perl script.
The username format will be: username_dbuser
The database format will be: username_dbname
The hostaddress will be: localhost
For example, enter the following variables:
the following format is placed in the connection string
[Note: The password remains the same format.]