Importing Large Database File

Recommended to use http://c9.io as this provides Linux environment in the cloud, this should mean faster upload to the server than from a local machine.

1) Start new c9.io workspace with PHP option or use existing one

2) Upload the .sql or .sql.zip file there using: File -> Upload Local Files

3) In c9 terminal, use linux 'cd' command to get to current directory. 'ls -a' will give output of current directory in terminal

4) If there is collation issue, like:

ERROR 1273 (HY000) at line 30: Unknown collation: 'utf8mb4_unicode_ci'

Then run this command to replace the 'mb4' part (or replace something similar if different issue)

sed -i 's/mb4//g'

5) Then, import the database via cmd line (this may take a while)

mysql -h mysql..com -u -p <

Posted on Dec 04, 2017