create and manage a MySql Database

How to Create and Manage a MySql Database in cPanel

After reading this article you can easily create and manage a MySql Database. Creating a is not only a single task you need to do other tasks also related the database to work with the website properly. Following are required to do before the link database with the website:

  1. Create a Database.
  2. Create a User and Password.
  3. Assign User with the Database.
  4. Add tables using phpMyAdmin.

After doing all the above processes you can link the with the website. here is your step by step guide create and manage a MySql Database:-

Create a MySql and Database User

We will cover 3 points in this section create MySQL database, create user, and assign a user to the database

  • Log into your cPanel with your username and password.
  • In CPanel under “Database” section, there are two option that allows creating a
create and manage a MySql Database
The look can be different in your cPanel

Create and Manage a MySql Using MySQL Database Wizard Option

  • Click the MySQL Wizard under the Databases section.
  • On the next page enter Database name in in “New Database” field and click Next Step button.
  • On the next page enter following:
    • Enter the username in the “Username” field.
    • Enter the password next to the “Password” field. (Keep safe password for future use)
    • Enter the password again in the “Password (Again)” field.
    • Click on the “Create User” button
  • On the next page, Assign privileges for the user to the database. On the top side check the “ALL PRIVILEGES” checkbox and then click on the Next Step button.

Successfully you created a MySql database using MySQL Database Wizard Option in cPanel.

Create and Manage a MySql Database Using MySQL Database Option

  • Click the MySQL Database under the Databases section.
  • On the next page, you will see the following sections
    • Create New Database
    • Modify Databases
      • Check Database
      • Repair Database
    • Current Databases: List of already created databases
    • Add New User
    • Add User To Database
    • Current Users: List of already created users
  • Create New Database:
    • In the “Create New Database” section in the field “New Database” enter “Database name” and click on the “Create Database” button.
    • You will see the success message with the name of the database on the next page. Your database created successfully, now Click on the “Go Back” link.
  • Now go to Add New User section:
    • Enter the username in the “Username” field.
    • Enter the password next to the “Password” field. (Keep safe password for future use)
    • Enter the password again in the “Password (Again)” field.
    • Click on the “Create User” button
    • You will see the success message with the name of the user on the next page. The user-created successfully, now Click on the “Go Back” link.
  • Now you need to link the database with the user.
  • Go to Add User To Database section:
  • Select username in “User” dropdown
  • Select the database in the “Database” dropdown.
  • Click on the “Add” button.
  • The next page will be “Manage User Privileges”, click on “ALL PRIVILEGES” checkbox and then click on “Make Changes” or “Assign” button.
  • A success message will flash with the name of the database and user.

Successfully you created a MySql database using MySQL Database Option in cPanel.

How to upload database tables to phpMyAdmin

  • In the cPanel home page under the “Database” section click on the “phpMyAdmin” option.
  • You will be redirected to a separate page.
  • A new page will open with 2 sections
    • In the left side window, a list of the databases will show.
    • In the right side window, database-related options will show.
  • Click on the database name.
  • Click on the “Import” tab.
  • Click on “Choose File” using ” Browse your computer: ” field, Select database backup file from the computer.
  • In the Format field select format of your file, according to our opinion file should be SQL file.
  • Click on the “Go” button.
  • If no error then you have uploaded database tables successfully.

How to delete a database in cPanel

  • In the cPanel home page under the “Database” section click on the “MySql Database” option.
  • On the next page scroll down and go to “Current Databases”.
  • You will see a list of created databases.
  • Next to database name under the heading “Actions”, you will see the “Delete” link icon with delete icon clicks on that.
  • Next page you need to confirm by clicking on the “Delete Database” button if you changed your mind and don’t want to delete the database then click on the “Cancel” link.
  • On confirming by clicking the “Delete Database” button. You will see success database delete messages with the name of the database.

How to delete a database user in cPanel

  • In the cPanel home page under the “Database” section click on the “MySql Database” option.
  • On the next page scroll down and go to the “Current Users” section.
  • You will see a list of users in the list find user which you want to delete.
  • Next to database username under the heading “Actions”, you will see the “Delete” link icon with delete icon clicks on that.
  • Next page you need to confirm by clicking on the “Delete User” button if you changed your mind or clicked by mistake then click on the “Cancel” link.
  • Read the username carefully and click on the “Delete User” button. The success message will show “User deleted name_of_selected_user”.

How to change the password of a database user in cPanel

  • In the cPanel home page under the “Database” section click on the “MySql Database” option.
  • On the next page scroll down and go to the “Current Users” section.
  • You will see a list of database users, in the list search username that user password you want to change.
  • Next to database username under the heading “Actions”, click on “Change Password” link.
  • Next page you need to set a new password. Enter a new password in “Password” and “Password(Again)” fields and click on the “Change Password” button.
  • You will password changed success message.

How to remove a user from the database in cPanel

  • In the cPanel home page under the “Database” section click on the “MySql Database” option.
  • On the next page scroll down and go to “Current Databases”.
  • You will see a list of created databases.
  • Next to database name under the heading “Privileged Users or Assigned Users” click on the delete icon.
  • Next page you need to confirm by clicking on the “Revoke User Privileges from Database” button.
  • On confirming by clicking the ” Revoke User Privileges from Database ” button user will be not able to connect with the database.

How to change the privileges of a user from the database in cPanel

  • In the cPanel home page under the “Database” section click on the “MySql Database” option.
  • On the next page scroll down and go to “Current Databases”.
  • You will see a list of created databases.
  • Next to database name under the heading “Privileged Users or Assigned Users” click on the name of the user.
  • Next page you need to select new privileges.
  • After select click on the “Make Changes” button.
  • Now users will be able to access the database with changed permissions

Now we thnk you can Create and Manage a MySql Database easily if you still have any confusion then feel free to contact us, We will happy to help you.

Don’t know how to upload images, code files to sever? Read our guide
How to create FTP account