Action disabled: source

Database Basics

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

Create a Database

There are two SQL Databases on cPanel, phpMyAdmin and MySQL Database. MySQL Database is the recommended application for new users, as it is the most basic and user-friendly. Click “MySQL Database Wizard” on the Dashboard to create a new database.

Create a name for your new database and then click “Next Step.”

Create a username and password for your database, then click “Create User.”

Generally, you will want to give users unlimited access. Check “ALL PRIVILEGES” to automatically check all the listed privileges. Then click “Next Step.”

You will be notified that your new database and database user have been created.

Manage Databases

Click on “MySQL Databases” on the dashboard.

Edit Databases

Under “Current Databases,” you can edit your database settings, with options to rename or delete a database. We strongly discourage renaming your databases; doing so will server any connections with it.

Users connected with a specific database will be listed under “Privileged Users.” To delete a specific user’s access to a database, click the trash can. -

You can edit the user’s privileges by clicking on the user's name. Select the privileges you want to give the user and then click “Make Changes.”

Add User to a Database

On the MySQL Databases page, you can also add users to a specific database. Users are created by entering the information under “Add New User” and then clicking “Create User.”

To connect this user to a database, select the username and corresponding database from the drop-down boxes available under “Add user to Database.” Then click “Add.“

Check Database for Errors

If your content will not appear on your website, or it appears that your website has crashed, it may have been caused by a database error. To check your databases for errors, click “MySQL Databases” on the Dashboard.

Under “Modify Databases,” select the database you wish to check from the drop-down list under “Check Database.” Once you have selected a database, click “Check Database.”

MySQL Databases will then check your database. If there are no errors, you will receive a screen that says “Check Complete”. If there are errors, you will need to attempt to repair them.

Repair Databases

Click on “MySQL Databases” on the Dashboard.

Under “Modify Databases,” select the database you wish to repair from the drop-down list under “Repair Database.” Then click “Repair Database.”

MySQL will attempt to repair the errors in your database. If successful, it will say “Repair Complete!”

Connect Database to Remote Server

Applications like bulletin boards, online shopping carts, and content management systems require databases to operate. You can give these applications access to your databases. Click on the “Remote MySQL” application on the Dashboard.

Add a new host by entering the host's name or IP address into the box. You may also use the percentage sign character (%) as a wildcard. For example, to allow access from all IP addresses that begin with 192.68.0, enter 192.68.0.%. Then click “Add Host.”

You can also revoke a specific host's access by clicking “Delete.”

And then clicking “Remove Access Host.”