You may need to import large databases, exceeding the phpMyAdmin limit and requiring a different procedure from the regular one.
Before starting a large database importation make sure that the user and the database are created and associated. Then you can choose between two different methods to process the database importation: via SSH or via MySQLDumper.
If you prefer to import your database via SSH:
- Upload the db.sql file to import via FTP in the account's main directory
- Access the service via SSH
- Execute the following command in the SSH terminal:
mysql -p -u username databse_name <dbname.sql (where username stands for the database username, database_name for the database name and dbname.sql for the database to import) - Type the database user's password and click on "Enter"
If the procedure has been successfully processed the terminal will be in stand by until the end of the operation and, if no error occurs, the import is successful.
You can also choose to import your database via MySQLDumper, an open source tool for MySQL database backup that you can easily download online and use to restore MySQL databases, especially on shared hosting.
In this case:
- Download the program, upload it and unzip it in the public_html folder, using your cPanel control panel's "File Manager"
- Open in your browser the link http://mydomain.xyz/msd1.24.4/install.php (replace mydomain.xyz with the domain associated to your cPanel account)
- Select "English" and click on "Install"
- Fill in all the required fields:
Database hostname: localhost
Port: empty
Socket: empty - Click on "Save" and continue;
- Upload the backup file (.sql or .zip) via FTP in public_html/msd1.24.4/work/backup folder;
- Go back to browser and click in the menu on "Restore";
- Select the backup and click on "Restore" (if the backup is not visible click on "Other programs backup").
To learn more on our web hosting solutions please visit our website.