Exporting Databases and Tables with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin. Let’s learn how to export a database.

  1. Click the database you wish to export here.phpma-export-frame03_1
  2. Then click the Export button.phpma-export-frame04_1
  3. In this case, we want to export the entire database in SQL format, so we can easily import it later. This is a good way to backup your database.
  4. Be sure to check any options you want before proceeding.phpma-export-frame06_1
  5. Check the Save as File check box, then click Go.phpma-export-frame11_1
  6. That’s it! The demo1234_members database has been exported to our local computer.
  7. If you only wanted to export a table, and not the entire database select the table you want to export and export just as you would a database.
  8. Remember that exporting tables only exports the selected tables within a database, whereas exporting a database will export all tables as well the data schema(provided they’re all selected).
  9. That’s it! The details table has been exported to its own file.

 

Importing Databases and Tables with phpMyAdmin

 

  1. This tutorial assumes you’ve already logged in to phpMyAdmin.
  2. Now let’s learn how to import a database.
  3. Click the database you wish to import here.phpma-import-frame03_1
  4. Let’s assume the data in our details table is corrupt, and we want to import a saved (exported) copy of the data.
  5. Therefore, let’s first delete the existing details table from our database.phpma-import-frame05_1
  6. Now let’s import the saved copy of our database, which includes the details table.phpma-import-frame07_1

    phpma-import-frame09_1

    phpma-import-frame14_1

  7. That’s it! The demo1234_members database has been successfully imported, as indicated here.

 

Searching Through a Database with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin.  Now let’s learn how to use the Search feature.

  1. Click the database you wish to search here.phpma-search-frame03_1
  2. Then click the Search tab and enter words or values to search for in the database.
    phpma-search-frame04_1
  3. There are several options you can use to refine your search. This database only has one table (details), but if there were more, you could limit your search to specific tables here.phpma-search-frame05_1
  4. When ready, click Go to perform the search. This search found one match. Click Browse.phpma-search-frame06_1
  5. We can now make changes to the record that was found.phpma-search-frame10_1
  6. Click Go when finished.

 

Running SQL Queries on a Database with phpMyAdmin

 

  1. This tutorial assumes you’ve already logged in to phpMyAdmin. Now let’s learn how to run SQL queries on a database.phpma-query-frame02_1
  2. Click the database table you wish to run a SQL query on.phpma-query-frame03_1
  3. Click the SQL button here.phpma-query-frame05_1
  4. Then type your SQL command. Click Go when finished.phpma-query-frame06_1
  5. In this case, we’re going to delete the address field from the details table using the command:ALTER TABLE details DROP COLUMN address;
  6. That’s it! The SQL command is executed when you click Go. Let’s go take a look.
  7. The address field is no longer in our details table.phpma-query-frame09_1
  8. You can also click the SQL button directly from the table view. Doing so presents a SQL query window that is partially filled in.phpma-query-frame10_1

 

Deleting Tables from a Database with phpMyAdmin

This tutorial assumes you’ve already logged in to phpMyAdmin. Now let’s learn how to delete a table from a database.

  1. Select the table you wish to delete here.phpma-deltable-frame2_1
  2. You can delete individual fields from this table by selecting them here then clicking the delete icon here.phpma-deltable-frame3_1
  3. However, in this tutorial, we’re going to demonstrate how to delete the entire table and everything in it.
  4. Click the Drop button here. Then click OK to confirm.phpma-deltable-frame4_1
  5. The addresses table has been deleted (or dropped) from the database.phpma-deltable-frame5_1
  6. The addresses table is no longer listed in our database’s list of tables.phpma-deltable-frame6_1

 

How To Repair a MySQL Database in cPanel

This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen. Let’s learn how to repair a database.

  1. Click the “MySQL Databases” icon.cpanel-pl-mysql-10-repair-02
  2. Under “Modify Databases”, and in the “Repair Database” drop down box, select the database you want to repair.cpanel-pl-mysql-10-repair-03
  3. Then click “Repair Database”.cpanel-pl-mysql-10-repair-04
  4. That’s it! The database has been repaired.cpanel-pl-mysql-10-repair-05

 

How To Delete a MySQL Database User in cPanel

This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen. Let’s learn how to delete a database user.

  1. Click the “MySQL Databases” icon.cpanel-pl-mysql-8-deleteuser-02
  2. Locate the “Current Users” section at the bottom of the page, and click the “Delete” icon next to the user you want to delete.cpanel-pl-mysql-8-deleteuser-03
  3. Then click “Delete User” to confirm.cpanel-pl-mysql-8-deleteuser-04
  4. That’s it! The database user has been deleted.cpanel-pl-mysql-8-deleteuser-05

 

How To Check a MySQL Database for Errors in cPanel

This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen. Now let’s learn how to check a database for errors.

  1. Click the “MySQL Databases” icon.cpanel-pl-mysql-9-check-02
  2. Under “Modify Databases”, and in the “Check Database” drop-down box, select the database you want to check.cpanel-pl-mysql-9-check-03
  3. Then click “Check Database”.cpanel-pl-mysql-9-check-04
  4. That’s it! The check has been completed, and no errors were found.cpanel-pl-mysql-9-check-05

 

How To Remove a User from a MySQL Database in cPanel

This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen.  Let’s learn how to remove a user from a database.

  1. Click the “MySQL Databases” icon.cpanel-pl-mysql-7-removeuser-02
  2. In the table of databases, locate the database you wish to remove a user from, locate the specific user assigned to that database that you want to remove and click the delete icon.cpanel-pl-mysql-7-removeuser-04
  3. Click “Revoke User Privileges from Database” to confirm.cpanel-pl-mysql-7-removeuser-05
  4. That’s it! The user has been removed from the database.cpanel-pl-mysql-7-removeuser-06
  5. The user hasn’t been deleted … you can see it’s still listed in the list of current users. It has simply been removed from that database.cpanel-pl-mysql-7-removeuser-07

 

How To Change a MySQL Database User’s Password in cPanel

This tutorial assumes you’ve already logged in to cPanel, and are starting on the home screen. Let’s learn how to change a database users password.

  1. Click the “MySQL Databases” icon.cpanel-pl-mysql-6-chguserpass-02
  2. Locate the user whose password you want to change, and click “Set Password”.cpanel-pl-mysql-6-chguserpass-03
  3. Enter and confirm a new password, then click “Change Password”.cpanel-pl-mysql-6-chguserpass-04
  4. That’s it! The database user’s password has been changed.cpanel-pl-mysql-6-chguserpass-05