How to import large sql file in phpmyadmin

前端 未结 20 1426
一向
一向 2020-11-29 17:04

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 ?

20条回答
  •  北海茫月
    2020-11-29 18:07

    One solution is to use the command line;

    mysql -h yourhostname -u username -p databasename < yoursqlfile.sql

    Just ensure the path to the SQL file to import is stated explicitly.

    In my case, I used this;

    mysql -h localhost -u root -p databasename < /home/ejalee/dumps/mysqlfile.sql

    Voila! you are good to go.

提交回复
热议问题