MKhost
Knowledgebase

Need help? Search or browse our large collection of articles on a variety of topics including hosting, domains, emails and more.

0cPanel

Creating databases, adding users to the database and granting permissions to each user accordingly

 

As a hosting package user, you can independently create databases through your cPanel account.

 

To successfully create a database through your cPanel account follow these steps:

 

Log in to your cPanel account with the appropriate username and password.

 

In the Databases section, click MySQL Databases

 

mysql database

 

In the newly opened window you have the opportunity to create databases and view existing databases. To create a new database, in the Create a New Database section, just type the database name (in our case the database name is baza). As you can see before the database name you choose, there is a domain name (in our case it's mkhost, in your case, the domain name will be your domain name) and click on Create Database.

 

create database

 

Eventually a notification will appear that the database has been successfully created.

 

If you click on Go Back, in the Current Databases section you can see the database you have already created. In the Action section you can rename or delete the database, while in the Modify Databases section you can check the correctness of the database or if there is a problem repairing it.

 

modify database

 

Once the database is already created, the next step you might want to take is to add users to the database. To add users to cPanel - Databases - MySQL Databases in the MySQL users section - Add a New User, you need to type the user name, generate a password that will have to contain letters, numbers and special characters to meet the security requirements and Finally click on Create a User.

 

mysql users - add new user

 

After the user has been created, a new window will appear, prompting for the successful creation of a new user.

 

After you create the user, you will need to add it to the appropriate database. You can do this in the Add a User to Database section, where in the user section you select the user you want to add, and in the Database section you select the database where you want to set up the user. Finally click on Add.

 

add user to database

 

In the newly opened Manage User Privileges window you need to select what privileges to assign to the new user in the database. In our example, the All privileges section is selected, and then click Make changes.

 

manage user privileges

 

After you save the changes and go back to the Current Databases section you can see all the databases that have been created so far as well as the users added to that database.

 

This completes database creation and adding users and privileges.