1. Home
  2. Technical Advice
  3. Import a database of more than 50 MB to a World account in SSH

Import a database of more than 50 MB to a World account in SSH

It is possible to import a database of more than 50 MB via SSH with the puTTY software under Windows or directly with the terminal under the MacOS environment. At first it will connect in SSH to his account. You will find how to make the connection in the following guide: Establish an SSH connection on its Mini-World, World and HybridCloud Hosting

This procedure is for advanced users. Be sure to save your work first!

Preparation of the hosting

1. You will need to have a blank database in your cPanel account to do the import. Go to the “MySQL Database Wizard” tool and follow the creation steps.

2. Drop the .sql file into a folder of your hosting (in the example, the file is in the / home / usercpanel / dumpsql)

3. Use the “Load” button in the interface to place your .sql file in the folder we just created. “/ Home / usercpanel / dumpsql”

3.1 Your file is now in the hosting.

Login in SSH

4. Now open the puTTY software. In the host, put your domain name. You will find all the connection instructions in the following article of our knowledge base: Establish an SSH connection on The World and HybridCloud

5. Scroll down to the folder that contains the .sql file. In this example, it is the folder “dumpsql”. The order will be >> cd dumpsql

cd dumpsql

Import database in command line (SSH)

6. You will now need to use the following command:

mysql -p -u usercpanel database_name <dump.sql

You will of course have to adapt this command with your cPanel username as well as your database name and the .sql file.
You will then need to enter your cPanel password to confirm the mysql command.

7. That’s it, your import via SSH is done. You can connect to phpMyAdmin to check your database.

Updated on 18 August 2021

Was this article helpful?

Related Articles