How to import large sql file in phpmyadmin

前端 未结 20 1429
一向
一向 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 17:55

    3 things you have to do:

    in php.ini of your php installation (note: depending if you want it for CLI, apache, or nginx, find the right php.ini to manipulate)

    post_max_size=500M
    
    upload_max_filesize=500M
    
    memory_limit=900M
    

    or set other values.

    Restart/reload apache if you have apache installed or php-fpm for nginx if you use nginx.

    Remote server?

    increase max_execution_time as well, as it will take time to upload the file.

    NGINX installation?

    you will have to add: client_max_body_size 912M; in /etc/nginx/nginx.conf to the http{...} block

提交回复
热议问题