How to import large sql files?
Posted by Edward T. on 11 April 2016 02:21 AM
Many users prefer to import a backed up database file (*.sql) through phpmyadmin,
Here we gonna show you how to import large sql files.(Normally larger than 50 MB)
Access your webhost's console through ssh
If you're using Cpanel, a manual can be found here:
Uploading *.sql file and preparing basics
Please upload the *.sql file, for instance "foo.sql" through FTP or a file manager (like Cpanel's file manager).
Also make sure you've created the database you like to import the "foo.sql" file into,
Import to database
Use ssh to access your host's terminal.
# ls -l /home/yourdomain/public_html/foo.sql
You should see something like this:
But, If you see such message:
Finally, Import the file into database:
You would be asked for password, just enter the password and hit Enter.