How to Create and Delete MySQL Databases and Users | Bluehost Support
Support
  1. bluehost knowledge base

How to Create and Delete MySQL Databases and Users

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



To begin, you will need to log in to your Bluehost control panel. 

If you are unsure whether the account uses the Account Manager or Bluerock interface, please see Account Manager vs. Bluerock to determine which steps to follow.

Account Manager

  1. Log in to your Bluehost control panel.
  2. Click the Advanced tab from the side navigation menu to the left. Then, click cPanel.
    bh-am-cpanel

Bluerock

  1. Log in to your Bluehost control panel.
  2. Click on the Advanced tab from the side navigation menu to the left.
    rock-advanced-tab

Create or Delete a MySQL Database

Create a MySQL Database

  1. Under the Database section, select MySQL databases.
    bh-am-mysql
  2. In the New Database field, type a name for the database.
    rock-create-newdb
  3. Click Create Database.
  4. Click Go Back.
    rock-create-newdb-success
    • The new database will appear in the Current Databases table.
      rock-newdb-appear

Delete a MySQL Database

  1. Under the Database section, select MySQL databases.
    bh-am-mysql
  2. Navigate to the Current Databases section.
  3. Click the Delete Database link next to the database you wish to delete
    rock-delete-db
If you would like to remove a user that has been assigned to a database, click the 🗑 trash can icon next to the user on this table.
rock-mysql-unassign-user

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. Under the Database section, select MySQL databases.
    bh-am-mysql
  2. Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click "Jump to MySQL Users".
    rock-jumpto-mysql-users
  3. Under Add New User, enter a username.
    rock-mysql-addnew-user

    Note: The username must be 7 letters or shorter.

  4. Enter a password in the Password field.

    Tip: For help generating a strong password, click the Generate Password button.

  5. Retype the password in the Password (Again) field.
  6. Click Create User.
    rock-newuser-success

Delete a Database User

  1. Under the Database section, select MySQL databases.
    bh-am-mysql
  2. Navigate to the Current Users section
    rock-delete-dbuser
  3. Click the 🗑 trash can icon next to the user you wish to delete

Define a User's Privileges

Privileges define how the user can 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 the Database section, select MySQL databases.
    bh-am-mysql
  2. Under Add User to Database, select a user from the User drop-down menu.
    rock-mysql-assign-user
  3. From the Database drop-down menu, select the database to which you wish to allow the user access.
  4. Click Add.
  5. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user or select ALL PRIVILEGES.
    rock-mysql-privileges
  6. Click Make Changes.
    rock-privileges-success

Un-assign, a Database User

To un-assign a user from a database, kindly click the 🗑 trash can icon next to the user on the database table.
rock-mysql-unassign-user

Using the Database

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

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.