How to import large sql file in phpmyadmin

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

    Solution for LINUX USERS (run with sudo)

    Create 'upload' and 'save' directories:

    mkdir /etc/phpmyadmin/upload
    mkdir /etc/phpmyadmin/save
    chmod a+w /etc/phpmyadmin/upload
    chmod a+w /etc/phpmyadmin/save
    

    Then edit phpmyadmin's config file:

    gedit /etc/phpmyadmin/config.inc.php
    

    Finally add absolute path for both 'upload' and 'save' directories:

    $cfg['UploadDir'] = '/etc/phpmyadmin/upload';
    $cfg['SaveDir'] = '/etc/phpmyadmin/save';
    

    Now, just drop files on /etc/phpmyadmin/upload folder and then you'll be able to select them from phpmyadmin.

    Hope this help.

提交回复
热议问题