How do I create a MYSQL database?
Each time a website is created, whether for personal or business use, an accompanying database must also be formed to keep data and information for that site. Luckily, website databases are mostly automatically generated, thanks to those auto-installer applications and scripts supplied by various website building software that we use today.
However, there are situations where we may need to create a database for our site manually. In such events, it is important that we have sufficient knowledge to accomplish the task effectively.
Manually Creating a Database in cPanel:
To manually create a database in cPanel, just follow the steps below.
Step 1: To begin creating a database manually, log in to your cPanel account.
Step 2: Once you are in the cPanel homepage, locate the Databases section.
Step 3: Under the Databases section, click the MySQL Databases Icon.
Step 4: After clicking the MySQL Databases icon, cPanel will direct you to the MySQL Databases interface page.
Step 5: In the MySQL Databases page, enter the name of the database that you are creating in the New Database field.
Step 6: After entering the name of your new database, click the Create Database button to continue.
Step 7: cPanel will direct you to a page where it will display a message confirming that you have successfully created a new database.
Step 8: Click on the “Go Back” link displayed under the confirmation message to return to the MySQL Database interface page.
Step 9: Now that you have created your new database, you need to add the users for that database.
If you need to create a new user, locate the MySQL Users section on the MySQL Database interface page and enter the details of the new user for the database that you have created in the Add New User fields.
Username – enter the username for that database user
Password – enter the password for the user you are creating
Password (Again) – re-enter the password for that user
Note – You can alternatively click on the Password Generator button to automatically create a strong password for that new user.
Click the Create User button to finish creating the new user for that database.
Step 10: To add a user to the new database that you have created, locate the Add User to Database section on the MySQL Database interface page.
Step 11: In the Add User to Database section, select the user that you want to add to the database that you have created in the User drop down list.
Step 12: After selecting the user, select the database that you have created in the Database drop down list.
Step 13: Click on the Add button to continue.
Step 14: You will now be directed to the Manage User Privileges page, where you can configure the database privileges for the user that you have selected.
Step 15: After configuring the database privileges for the user that you have selected, click on the Make Changes button to finish linking the user to the database that you have created.
Congratulations! You have successfully created a new database and linked a user for it.