How to import a database via hosting control panel

If you have a site that works with one of the popular CMSs (WordPress, Joomla!, Drupal, etc.), a forum, or just a website that requires a database, you have to import your database dump to the server when you upload or transfer your site. This requires your database to be already created in your control panel. After this, you can import your database dump through your control panel or by connecting via SSH.

DirectAdmin

The first method:

  1. Go to your client area to the “Hosting management” section and click the “Open Direct Admin” button;
  2. The Direct Admin panel will be opened. Go to the “Account Manager” section and click the “MySQL Management” button;
  3. Click the “Upload Backup” button;
  4. Select the database you want to import your dump to from the “Select Database” drop-down list;
  5. Click the outlined area which contains the upload icon;
  6. Find your dump (.sql) or dump archive (zip, tar, tar.gz) using your system’s explorer, select it and click the “Open” button;
  7. Click the “Upload” button and wait until uploading is finished.

The second method – phpMyAdmin:

  1. Go to your client area to the “Hosting management” section and click the “Open Direct Admin” button;
  2. The Direct Admin panel will be opened. Go to the “Extra Features” section and click the “phpMyAdmin” button;
  3. Type in your database user login and password specified when creating a database;
  4. phpMyAdmin will be opened in a new window. Click the name of the needed database in the left menu bar inside the phpMyAdmin;
  5. Click the “Import” button in the top menu bar;
  6. Click the “Choose file” button next to the “Browse your computer” line;
  7. Find your dump (.sql) or dump archive (zip, tar, tar.gz) using your system’s explorer, select it and click the “Open” button;
  8. Click “Go” at the bottom of this page and wait until uploading is finished.

Sometimes you have to purge a database from old tables to import a new dump. Database cleanup allows you to avoid data conflicts.

How to purge a database?

  1. Go to your client area to the “Hosting management” section and click the “Open Direct Admin” button;
  2. The Direct Admin panel will be opened. Go to the “Extra Features” section and click the “phpMyAdmin” button;
  3. Type in your database user login and password specified when creating a database;
  4. phpMyAdmin will be opened in a new window. Click the name of the database you want to clean up in the left menu bar inside the phpMyAdmin;
  5. A database’s table list will appear. Scroll down this list and hit the “Check all” checkbox to select all the tables;
  6. Select the “Drop” option from the “With selected” drop-down list;
  7. A new window asking to confirm this action will be opened. Click “Yes”;
  8. Once you see the “No tables found in database” message, purging is finished.

cPanel

  1. Go to your client area to the “Hosting management” section and click the “Open cPanel” button;
  2. The cPanel will be opened. Go to the “Databases” section and click the “phpMyAdmin” button;
  3. phpMyAdmin will be opened in a new window. Click the name of the needed database in the left menu bar inside the phpMyAdmin;
  4. Click the “Import” button in the top menu bar;
  5. Click the “Choose file” button next to the “Browse your computer:” line;
  6. Find your dump (.sql) or dump archive (zip, tar, tar.gz) using your system’s explorer, select it and click the “Open” button;
  7. Click “Go” at the bottom of this page and wait until uploading is finished.

How to purge a database?

  1. Go to phpMyAdmin;
  2. phpMyAdmin will be opened in a new window. Click the name of the database you want to clean up in the left menu bar inside the phpMyAdmin;
  3. A database’s table list will appear. Scroll down this list and hit the “Check all” checkbox to select all the tables;
  4. Select the “Drop” option from the “With selected:” drop-down list;
  5. A new window asking to confirm this action will be opened. Click “Yes”;
  6. Once you see the “No tables found in database.” message, purging is finished.

ISPmanager

The first method:

  1. Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
  2. You can import the database by going to the section “Dashboard – Databases”;
  3. Select the name of the database and click the “Upload” button;
  4. Click the “Choose file” button;
  5. Find your dump (.sql) or dump archive (zip, tar, tar.gz) using your system’s explorer, select it and click the “Open” button;
  6. Click the “Ok” button and wait until uploading is finished.

The second method – phpMyAdmin:

  1. Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
  2. You can import database by going to the section “Dashboard – Databases”, select the name of the database and click the “Go” button;
  3. phpMyAdmin will be opened in a new window. Click the name of the needed database in the left menu bar inside the phpMyAdmin;
  4. Click the “Import” button in the top menu bar;
  5. Click the “Choose file” button next to the “Browse your computer:” line;
  6. Find your dump (.sql) or dump archive (zip, tar, tar.gz) using your system’s explorer, select it and click the “Open” button;
  7. Click “Go” at the bottom of this page and wait until uploading is finished.

How to purge a database?

  1. Go to your client area to the “Hosting management” section and click the “Open ISPmanager” button;
  2. The ISPmanager panel will be opened. Go to the “Dashboard – Databases” section, select the name of the database and click the “Go” button;
  3. phpMyAdmin will be opened in a new window. Click the name of the database you want to clean up in the left menu bar inside the phpMyAdmin;
  4. A database’s table list will appear. Scroll down this list and hit the “Check all” checkbox to select all the tables;
  5. Select the “Drop” option from the “With selected:” drop-down list;
  6. A new window asking to confirm this action will be opened. Click “Yes”;
  7. Once you see the “No tables found in database.” message, purging is finished.

Plesk

  1. Go to your client area to the “Hosting management” section and click the “Open Plesk” button;
  2. The Plesk panel will be opened. Go to the “Databases” section and click the button ”Import Dump”:
    • To deploy a dump from your local computer, select “Upload” and click the “Browse” button. Then select the ZIP archive containing the dump file;
    • To deploy a dump from a directory on the server, select “Import” and select the dump file;
  3. Click the “OK” button and wait until uploading is finished.

If the database dump exceeds 500 MB, you need to connect via SSH and import:

  1. Upload your database dump to your hosting folder via FTP;
  2. Establish an SSH connection to your hosting;
  3. Using the terminal, proceed to the folder containing your dump file;
  4. Type in the following command: mysql -u username -p basename < dump.sql, where:
    • username – your database user name;
    • basename – your database name;
    • dump.sql – the name of the uploaded dump file;
  5. Hit the “Enter” key once finished;
  6. The terminal will require a password. Type in the password of your database user (no symbols will be displayed due to the terminal security settings) and hit the “Enter” key again;
  7. Wait until uploading is finished. Once you see a blinking cursor again, your dump is imported.
Rate this article
Share this article
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
In this article