Loading...

Knowledge Base

How to Create and Delete MySQL Databases and Users

Databases play a critical role in the digital world, especially when managing vast amounts of data efficiently. They serve as the backbone for various web-based applications by providing a structured way to store, retrieve, and manipulate data. 

In essence, databases are indispensable for the functionality and efficiency of web-based applications. They enable these platforms to handle large volumes of data seamlessly, support multiple users, and provide dynamic content and interactions.

Access cPanel

There are 2 ways to access cPanel.

Via the Hosting Tab

  1. Log in to your Bluehost Account Manager.
  2. Click Hosting in the left-hand menu.
  3. In the hosting details page, click the CPANEL button.

    Bluehost Account Manager - Hosting Tab Details cPanel
     

  4. Your cPanel will open in a new tab.

    Bluehost Account Manager - Hosting Tab - Quick Links - cPanel button - cPanel Dashboard
     

Via the Websites Tab

  1. Log in to your Bluehost Account Manager.
  2. In the left-hand menu, click Websites.
  3. Click the MANAGE button located next to the website you want to manage.

    Bluehost Account Manager - Website Manage button
     

  4. On the OVERVIEW tab, click on CPANEL below.

    Multiple hosting plans - cPane Email link
     

  5. Your cPanel will open in a new tab.

    Bluehost Account Manager - Hosting Tab - Quick Links - cPanel button - cPanel Dashboard
     

Create or Delete a MySQL Database

How to Create a MySQL Database

  1. Navigate to the Database section and select MySQL Databases.

    BH cPanel - MySQL Databases
     

  2. Enter a name for the database in the field New Database.

    BH cPanel - Create Database
     

  3. Click on the Create Database button.
  4. Click on the option Go Back.

    BH cPanel - Create Database - Go Back
     

    The newly created database will be displayed in the Current Databases table.

    BH cPanel - Current Databases
     

How to Delete MySQL Databases

  1. Go to the Database section and select MySQL Databases.

    BH cPanel - MySQL Databases
     

  2. Navigate to the Current Databases section.
  3. Click the Delete database link next to the database you want to remove.

    BH cPanel - Delete Database
     

Create or Delete a Database User

After creating the database, a MySQL user account must be created separately from mail and web administrator accounts. Once created, the user account will need to be granted privileges to access the newly created database.

Create a Database User

  1. Navigate to the Database section and select MySQL databases.

    BH cPanel - MySQL Databases
     

  2. Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click "Jump to MySQL Users".

    BH cPanel - Jump to Users
     

  3. Enter the desired username and password in the fields. Click Create User.

    BH cPanel - Create Database User
     

    The username must be 7 letters or shorter.
  4. Click on the option Go Back.

    BH cPanel - Create Database User - Go Back
     

Delete a Database User

  1. Go to the Database section and choose MySQL Databases.

    BH cPanel - MySQL Databases
     

  2. Navigate to the Current Users section.

    BH cPanel - Delete User
     

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. Go to the Database section and MySQL databases.

    BH cPanel - MySQL Databases
     

  2. Go to the Add User To Database section. Select the desired user from the User drop-down menu and the Database from the drop-down menu. Click Add.

    BH cPanel - Add User to Database
     

  3. On the MySQL Account Maintenance screen, you can choose the privileges to grant the user or select ALL PRIVILEGES. Click Make Changes.

    BH cPanel - Add User to Database - All Privileges
     

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.

Summary

Managing databases is critical to running web-based applications such as bulletin boards, content management systems, and online retail shops. The process involves several key steps, accessible through the cPanel, which serves as a central hub for hosting management.

Key Steps Include:

  1. Accessing cPanel
  2. Creating or Deleting a MySQL Database
  3. Creating or Deleting a Database User
  4. Defining a User's Privileges
  5. Using the Database

Efficient database management is crucial to the smooth operation of our web-based services. cPanel provides users with a comprehensive set of tools for database creation, user management, and privilege assignment, ensuring that databases are secure and function effectively. Following the steps outlined provides a foundational understanding of database management, enabling users to maintain their web applications confidently.

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.

Did you find this article helpful?

 
* Your feedback is too short

Loading...