Bluehost Web Hosting Help
How to Create and Delete MySQL Databases and Users
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 or Delete a Database User
- Define a User's Privileges
- Using the Database
Create or Delete a MySQL Database
Create a MySQL Database
- Log into the cPanel
- Click the MySQL Databases icon under the "Databases" category
- In the New Database field, type a name for the database.
- Click Create Database.
- Click Go Back.
- The new database will appear in the Current Databases table.
Delete a MySQL Database
- Navigate to the Current Databases section
- Click the Delete Database link next to the database you wish to delete
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
- Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click "Jump to MySQL Users".
- Under Add New User, enter a username.
Note: The username must be 7 letters or shorter.
- Enter a password in the Password field.
- For help generating a strong password, click the Generate Password button.
- Retype the password in the Password (Again) field.
- Click Create User.
Delete a Database User
- Navigate to the Current Users section
- Click the red "X" icon next to the user you wish to delete
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
- Under Add User to Database, select a user from the User drop-down menu.
- From the Database drop-down menu, select the database to which you wish to allow the user access.
- Click Add.
- From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
- 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.
- How to Copy or Rename a Database
- Remote Database Connection Setup
- Managing Databases with Applications
- MySQL Connection Strings
Recommended Help Content
Resetting MySQL Database User and Password
This article will explain how to change the password for a database in the event that the original password is lost. (updated 854 days ago)
Connecting Scripts to MySQL Databases
This article will explain how to connect your scripts to your MySQL databases. (updated 854 days ago)
Wordpress Install Without Automatic Database Creation
This article explains how to install WordPress when Mojo is unable to create the database automatically. (updated 43 days ago)
Related Help Content
Importing Databases via Command Line (SSH)
This article will instruct you how to import a database from the command line (SSH). (updated 25 days ago)
Dropping columns from a database table in phpMyAdmin
A tutorial on how to perminately delete columns from your mySQL database using phpMyAdmin (updated 861 days ago)
Managing Databases via Command Line (SSH)
This article will instruct you how to export a database from the command line (SSH). (updated 632 days ago)
Managing Databases with Applications
This article will go over different application available for remote connection to your databases. (updated 858 days ago)
Setting a Password for the Main MySQL User
I am prompted to set a new MySQL password. What does this mean and how do I change it? (updated 1002 days ago)
How to Backup a MySQL Database
How do I create a MySQL backup? (updated 393 days ago)
MySQL Database Compatibility
How do I make my MySQL database compatible with the version you provide? (updated 2058 days ago)
MySQL Database and user name convention
I cannot connect to my database locally or remotely, do I have the correct server, username and password? (updated 1928 days ago)