HostMonster Web Hosting Help

How to Create and Delete MySQL Databases and Users

Summary

Databases offer a method for managing large amounts of information easily over the web. They are necessary to run many web-based applications such as bulletin boards, content management systems, and online retail shops.


Click to Jump to a Section


Create or Delete a MySQL Database

Create a MySQL Database

  1. Log into the cPanel
  2. Click the MySQL Databases icon under the "Databases" category

    MySQL Databases

  3. In the New Database field, type a name for the database.

    Create Database

  4. Click Create Database.
  5. Click Go Back.
    • The new database will appear in the Current Databases table.

Delete a MySQL Database

  1. Navigate to the Current Databases section
  2. Click the Delete Database link next to the database you wish to delete

    Deleting a Database

If you would like to remove a user that has been assigned to a database, click the red "X" next to the user on this table. To see instructions on how to assign a user, click here.

Create or Delete a Database User

After creating the database, a user will need to be created and their privileges added to the newly created database. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.

Create a Database User

  1. Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click "Jump to MySQL Users".
  2. Under Add New User, enter a username.
    Note: The username must be 7 letters or shorter.

    Create MySQL Username

  3. Enter a password in the Password field.
    • For help generating a strong password, click the Generate Password button.
  4. Retype the password in the Password (Again) field.

    Create MySQL Password

  5. Click Create User.

Delete a Database User

  1. Navigate to the Current Users section
  2. Click the red "X" icon next to the user you wish to delete

    Delete a Database User

Define a User's Privileges

Privileges define how the user is able to interact with the database. For example, they will determine whether or not the user can add and delete information.

Assign a Database User

  1. Under Add User to Database, select a user from the User drop-down menu.

    Add User to Database

  2. From the Database drop-down menu, select the database to which you wish to allow the user access.
  3. Click Add.
  4. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
  5. Click Make Changes.

Un-assign a user

To un-assign a user from a database click the red "X" next to the user on the database table. You can see an example of this table by clicking here.

Using the Database

Now that you can create databases, users, and assign appropriate privileges, you can use the following articles as a reference to editing and connecting to your databases.

Knowledgebase Article 476,267 views bookmark tags: creation database mysql (updated 10 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will explain how to change the password for a database in the event that the original password is lost. (updated 945 days ago)
Knowledgebase Article 31,344 views tags: database mysql password

This article will explain how to change or reset the password for a MySQL user. (updated 66 days ago)
Knowledgebase Article 1,275 views tags: change mysql password reset user

This article will explain how to connect your scripts to your MySQL databases. (updated 945 days ago)
Knowledgebase Article 30,286 views tags: database mysql scripts

Related Help Content

This article explains how to install WordPress when Mojo is unable to create the database automatically. (updated 46 days ago)
Knowledgebase Article 4,472 views tags: MOJO automatic database install wordpress

This article will explain how to convert a MySQL database to UTF-8. (updated 50 days ago)
Knowledgebase Article 816 views tags: character database encoding mysql utf

This article will instruct you how to import a database from the command line (SSH). (updated 116 days ago)
Knowledgebase Article 415,635 views tags: database mysql ssh

A tutorial on how to perminately delete columns from your mySQL database using phpMyAdmin (updated 951 days ago)
Knowledgebase Article 38,439 views tags: Plesk cpanel databases mysql phpmyadmin

I am prompted to set a new MySQL password. What does this mean and how do I change it? (updated 1093 days ago)
Knowledgebase Article 68,586 views tags: connect database mysql password phpmyadmin username

This article will instruct you how to export a database from the command line (SSH). (updated 722 days ago)
Knowledgebase Article 452,034 views tags: database mysql ssh

This article will go over different application available for remote connection to your databases. (updated 949 days ago)
Knowledgebase Article 49,402 views tags: database mysql

How do I make my MySQL database compatible with the version you provide? (updated 2149 days ago)
Knowledgebase Article 84,585 views tags: database mysql