Skip to main content

Tag: cpanel

cPanel MySQL Database Management


MySQL is the most popular Open Source SQL Database management system. To manage a huge volume of data efficiently, we store the data in tables, a group of many tables can be created in a single database. This interface allows you to create and manage the existing MySQL databases.

If you are creating a PHP based application or any application that uses a database, then you will need to create a database and a database user to access this database. To use WordPress, Drupal, Joomla or any other CMS, you will need to create a MySQL database before installing these CMS.

To create a new MySQL database, you need to open MySQL interface by clicking MySQL Databases link, which can be found in the Databases section of cPanel Home.

Create a New Database

When MySQL Databases interface will open, first thing you will see is Create New Database Section as shown below.

To create a database, simply enter the name of the database you wish to create and then click Create Database Button. You will now get a success message that the database is added.

Note − cPanel will automatically add a prefix to your database name you enter. So that there is no ambiguity in databases as in shared hosting environment. There are many users and there cannot be same name for two databases, thus your database name become Prefix_dbName. When connecting the database with web application you will need to use Full Name of database.

Add a Database User

To use your newly created database in your application, you will need to create a user and grant it all the privileges to modify the data in Database.

To create a Database User, scroll down to the end in Interface of MySQL databases. There you will see MySQL users, under it there will be Add New User, as shown below.

Step 1 − Enter a username according to your choice and choose a strong password. Click Create User to create a new user. You will get a success message “You have successfully created a MySQL user.

Note − Full username of your database user includes prefix and the username you provided.

As we have created a database user, now we will need to add the user to access the database.

Step 2 − Scroll down to find “Add User to Database”.

Step 3 − Select the User and database you wish to associate together. Click Add button and you will see the following screen.

To provide all the privileges to the user, select ALL PRIVILEGES checkbox and all the checkboxes will automatically get selected. Click Make Changes to save the changes.

Modifying a Database

The data stored in MySQL may get corrupted over time. There are many reasons for which this might happen. While using the Database in web application, if we see any database related error, we need to repair the database to repair the corrupt data. But before we repair our database, we will need to find the table on which our data is corrupted by checking the database for errors.

There are two operations we can perform to troubleshoot database related errors. To perform these actions, we need to scroll to Modify Database Options in MySQL Database Interface, screenshot for Modifying Database is shown below.

Check a Database

With this feature of cPanel Database, you can find which table in the Database is corrupted.

To check a database, we need to perform the following steps.

Step 1 − Select the database you want to check, from the dropdown menu of Check Database, as shown above.

Step 2 − Click the Check Database button.

Step 3 − cPanel will now run an automated script to find the corrupt table in the Database. If any corrupt table is found, it will display the name of the Table, otherwise it will display a success message.

Repair a Database

This database tool helps in automatically repairing of corrupt data or table from the database.

To use this tool, we need to perform the following steps −

Step 1 − Select the database having corrupt data from the dropdown menu.

Step 2 − Click Repair Database button.

Step 3 − cPanel will now run an automatic script to repair the corrupt data or table from the database, if it succeeds, it will give you a success message. If it fails to repair the database, it will show you an error with the table name on which the error occurred.

cPanel Virus Scanner


Many cPanel web hosting comes with this ClamAV virus scanner feature to guard against potential threats on your server. You can run on-demand scan of your files to see if they are infected with any virus or not. ClamAV is an open source powerful antivirus, it uses its extensive database to detect several types of potential threats like viruses, Trojan horses, malwares, malicious scripts etc.

You can scan different sectors of your home directory using the antivirus. To scan your account with a virus scanner, use the following steps.

Step 1 − Open cPanel Virus Scanner by clicking the Virus Scanner link in the Advanced section of the cPanel home.

Step 2 − You can choose the scan type from here.

  • Scan Entire Home Directory − This option will scan your entire cPanel account. If you choose this option, no need to run the scan on other options. This will scan your home directory, which contains the Emails, FTP accounts and Website.
  • Scan Mail − This option will scan your emails for viruses. If somebody sends a malicious email having some virus or malware, this virus scanner will tell you that.
  • Scan Public FTP Space − This option will scan your public_ftp folder. If somebody uploaded a malicious file through FTP, virus scanner will find it.
  • Scan Public Web Space − This option will scan your public_html in which all your front end files reside.

Step 3 − Click Scan Now button to start the scan and it will automatically show you the results.

If the Virus Scanner finds any malicious software, then it will give you options to correct the error. You may choose the option accordingly.

Note: Virus Scanner takes time specially when your cPanel account has a lot of files and directories. It is recommended to perform virus scanning during off-peak hours.

cPanel Indexes


You can customize the way a directory looks in your website. By default, cPanel displays the list of files and directories, if there is no index file in that directory. You can choose the way it displays the list of contents in the front-end. You can also choose to disable the indexing of files in that directory by choosing No Indexing.

To manage cPanel Indexes, follow these steps −

Step 1 − Open cPanel Index Manager by clicking on Indexes found under Advanced section of cPanel Home.

Step 2 − You can select a directory of which you wish to manage indexes by clicking over the name of directory. To navigate within directories, you can click on the folder icon corresponding to that directory to open up the directory.

Step 3 − Once you have selected the directory, you will be given some options to choose form.

  • Default System Indexing − Enables the default setting your hosting provider setup for you.
  • No Indexing − This option will disable the directory listing and if there is no index file such as index.php or index.html in the directory. User will get an error.
  • Standard Indexing − This option will enable the directory listing and user will see the name of the directories.
  • Fancy Indexing − This option will enable the directory listing and user will see the name and description of the files and directories under your indexed directory

Step 4 − Click Save to save your choice for that directory. If successful, you will see a success message.

cPanel Statistics & Dashboard


In this chapter, we will discuss about the cPanel statistics and the dashboard along with a few examples and screenshots for better understanding.

cPanel Statistics

The statistics interface of cPanel shows quick statistics of your cPanel account. It includes several types of information shown below. You will find this information in cPanel statistics.

General − It will show you the amount of bandwidth allotted to your account and also the amount of bandwidth, which is used by you. It will also show you the FTP accounts available in your cPanel account. It will also show the information of your Home directory and the IP address, from which you logged in last time. You can click on the Server Information to view the detailed information of your server.

Domain Info − In the next box, it will show you the information of main domain and the number of add-on domains, subdomains and aliases you have created.

Mail Info − This section will show the information about your emails. It will tell you how many email accounts, Autoresponder Forwarders and Filters you have created along with the total number of resource allotted.

Disk Space − In this section, the total disk space of your account is shown and also the amount of space used by MySQL database is shown along with total amount of space allotted to your account and MySQL database.

Database − This section shows the info of total number of databases you have created along with the total number of database you can create.

System Information − In this section, the statistics cPanel shows you the information of your system with total CPU usage, virtual and physical memory that is being used. It also displays information of the process you are running, the Input and Output uses and also it displays number of nodes, which means the number of files.

Your cPanel version and other server information can also be viewed in your cPanel home.

This can be found in your cPanel’s right side and click Server Information: