How to import large sql file in phpmyadmin

前端 未结 20 1311
一向
一向 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:01

    I was able to import a large .sql file by having the following configuration in httpd.conf file:

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
        Require all granted
    
        php_admin_value upload_max_filesize 128M
        php_admin_value post_max_size 128M
        php_admin_value max_execution_time 360
        php_admin_value max_input_time 360
    </Directory>
    
    0 讨论(0)
  • 2020-11-29 18:02

    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}
    
    0 讨论(0)
  • 2020-11-29 18:02

    You will have to edit the php.ini file. change the following upload_max_filesize post_max_size to accommodate your file size.

    Trying running phpinfo() to see their current value. If you are not at the liberty to change the php.ini file directly try ini_set()

    If that is also not an option, you might like to give bigdump a try.

    0 讨论(0)
  • 2020-11-29 18:05

    For that you will have to edit php.ini file, If you are using the ubuntu server this is link Upload large file in phpMyAdmin might help you.

    0 讨论(0)
  • 2020-11-29 18:06

    Change your server settings to allow file uploads larger than 12 mb and you should be fine. Usually the server settings are set to 5 to 8 mb for file uploads.

    0 讨论(0)
  • 2020-11-29 18:07

    Create a zip or tar file and upload in phpmyadmin thats it..!

    0 讨论(0)
提交回复
热议问题