How to Import 1GB .sql file to WAMP/phpmyadmin

前端 未结 13 2048
旧巷少年郎
旧巷少年郎 2020-12-04 09:46

I want to import over 1GB size sql file to MySQL database in localhost WAMP/phpmyadmin. But phpmyadmin UI doesn\'t allow

13条回答
  •  天涯浪人
    2020-12-04 10:38

    I suspect you will be able to import 1 GB file through phpmyadmin But you can try by increasing the following value in php.ini and restart the wamp.

    post_max_size=1280M
    upload_max_filesize=1280M
    max_execution_time = 300 //increase time as per your server requirement. 
    

    You can also try below command from command prompt, your path may be different as per your MySQL installation.

    C:\wamp\bin\mysql\mysql5.5.24\bin\mysql.exe -u root -p db_name < C:\some_path\your_sql_file.sql
    

    You should increase the max_allowed_packet of mysql in my.ini to avoid MySQL server gone away error, something like this

    max_allowed_packet = 100M
    

提交回复
热议问题