Some Web applications request access to a database connected with your website so they can retrieve data. A database stores computer data for efficient retrieval. When visitors enter your site, they need to retrieve posts and photos, and a database organizes your data and makes it easy to access. SQL is the language a computer uses to retrieve this data. If you are using a CMS such as WordPress or Drupal, it automatically uses a database to retrieve your site information.

In this section, we’ll discuss:

  • Creating a Database
  • Managing a Database
  • Checking a Database for Errors
  • Repairing a Database
  • Connecting a Database to a Remote Server

Creating a Database

There are two SQL databases in the cPanel: phpMyAdmin and MySQL Database. We recommend the MySQL Database application for new users because it’s the most basic and user-friendly application. If you plan on storing a lot of data on your database, we recommend you use an outside storage service.

1. From your cPanel, click MySQL Database Wizard to create a new database.
musites_mysql_database_wizard
 

2. Type a name for your database in the New Database text field, and then click Next Step.
musites_name_new_database
 

3. Type a username and password in the appropriate text boxes for the database, and then click Create User.
musites_database_username
 

4. Select All Privileges to give users unlimited access, which is recommended. Click Next Step, when finished.
musites_add_user_to_database
 

5. A confirmation page appears acknowledging your new database and user.
musites_new_database_complete
 

Managing a Database

From your cPanel, click MySQL Databases.
musites_mysql_databases
 

Editing a Database

The Current Databases section gives you the opportunity to edit your database.

  • Click Rename to rename a database. It is strongly recommended NOT to rename a database. When a database is renamed, all connections with it are severed.
  • Click Delete to delete a database.
  • Click the trash can icon next to a privileged user to remove his or her access to a database.
  • Click a name in the Privileged Users list to edit a user’s privileges. Select privileges, and then click Make Changes.

musites_current_databases
 

Adding a User to a Database

1. In the Add New User section, complete the form, and then click Create User.
musites_add_new_user
 

2. In the Add User To Database section, select the username and corresponding database from the lists, and then click Add.
add_user_to_database
 

Editing a User

The Current Users sections gives you the opportunity to edit a user. You can change a user’s password, rename a user, or delete a user.

Checking a Database for Errors

If your content won’t appear on your website, or your website crashed, it may have been caused by a database error.

Follow these steps to check your database for errors.

1. From your cPanel, click MySQL Databases.
2. In the Modify Databases section, choose the database to check from the Check Database list.
3. Click Check Database
musites_check_database
 

4. A confirmation page appears. If errors are present, you need to attempt to repair them.
musites_check_database_confirmation
 

Repairing a Database

1. From your cPanel, click MySQL Databases.
2. In the Modify Databases section, choose the database to repair from the Repair Database list.
3. Click Repair Database.
musites_repair_database
 

4. The system will attempt to repair the errors in your database. If successful, a confirmation appears.
musites_repair_database_confirmation
 

Connecting a Database to a Remote Server

Applications like bulletin boards, online shopping carts, and content management systems require databases to operate. You can authorize these applications to have access to your database.

1. From your cPanel, click Remote MySQL.
musites_remote_mysql
 

2. Type the host’s name or IP address in the Host text box, and then click Add Host% as a wildcard. For example, to allow access from all IP addresses that begin with 192.68.0, type 192.68.0.%.
3. Remove a host’s access by clicking Delete, and then clicking Remove Access Host.
musites_remove_access_host

« --- »

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *