How do I create a MySQL database, a user, and then delete if needed? Print

  • 0

Your cPanel allows you to easily create a MySQL database, create database users, and assign database user privileges. You can also delete databases and remove database users.

1. Create the Database

Create: If you are using any type of PHP software or keeping a collection of records which need to be accessed in some way, you will need to create a database. Below will show you how to create a MySQL database in cPanel.

  1. Click the MySQL Databases icon.
  2. Under "Create New Database" enter the name of the Database you wish to create.
  3. Click the Create Database button.

You have now successfully added the database, You will now need to create a user to access the database.

2. Create a Database User and Assign Privileges

Create User: Whenever you have any type of MySQL database, you will need to assign a user to be able to access the database. If you would like to create a user and give them access to the database, please do the following:

  1. Click MySQL Databases
  2. Scroll down until you see "Add New Users".
  3. Enter your database username.
  4. Enter your database password.
  5. Enter your database password one more time.
  6. Click Create User.

2.1 Assigning the Database a User.


  1. Under "Add User To Database" you will see two dropdown menus. These will reflect your existing Databases and Users.
  2. In the User drop down, Select the username you wish to assign to your Database.
  3. In the Database drop down, Select the Database you would like assigned to the username.
  4. Click "Add" Once you have selected desired Database and username to be assigned.
Please note that anytime you create a Database or Database Username it will always appear as your cPanel username and then the Database name or Database username

An example of this would be : cpaneluser_database or cpaneluser_dbuser

2.2 Assigning the user privileges.

  1. Click "ALL PRIVILEGES" to select all of the required Database privileges.
  2. Click "Make Changes" to finalize the changes and add the user to the database. 


3. Delete a Database

Delete : If you are deleting a script or would like to restart a new database, the first step is to delete the old MySQL database. To do so, please do the following :

  1. Click MySQL Databases
  2. Under Current Databases, you will find a list of all your current databases.
  3. Click "Delete Database" next to the name of the database you would like to delete.

Was this answer helpful?

« Back

Need help? Call our award-winning support team at 080 3791 8162