How to import large sql file in phpmyadmin

Jasmeet Kaur Chauhan picture Jasmeet Kaur Chauhan · Jul 3, 2012 · Viewed 218.7k times · Source

I want to import a sql file of approx 12 mb. But its causing problem while loading. Is there any way to upload it without splitting the sql file ?

Answer

manurajhada picture manurajhada · Jul 3, 2012

Try to import it from mysql console as per the taste of your OS.

mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql path}

or if it's on a remote server use the -h flag to specify the host.

mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {db.file.sql path}