First, login to your CPanel account. If you don’t have your username and password, you’ll need to contact your web hosting provider.
Once you’ve logged in, select MySQL databases from the list. Keep in mind that your Cpanel account may be using a skin or different theme, so it will not always look exactly like the screenshot below.
In order to create a new database you need to enter the desired name for the database in the New Database field and click on the Create Database button as shown below:
A confirmation screen will be displayed, informing that the database has been successfully created:
The MySQL database is created with your username as prefix - username_databasename and this is the name you have to use for your application.
You can click on the Go Back button to return to the database management screen.
Creating a MySQL Username
You can continue with the creation of a user who should be able to connect to the newly created database. To create a user you just need to fill in the desired user name and password as shown in the image below:
Click Submit to save your MySQL username. You should always bear in mind that your cPanel username will be added as a prefix to all databases and usernames you create.
Adding a user to a MySQL Database
Once the database and the username are created, you can add certain privileges for the user to the database. In order to do so you should select them both from the corresponding drop-down menus under Add User To Database label and click on the Submit button:
You will be redirected to a screen where you will be prompted to choose the desired privileges. It is advisable to select All Privileges and click on the Make Changes button:
That’s it. You’re now ready to use the MySQL database that you just created.
Other tutorials in Website general:
Popular Tutorials: