How to import large sql file in phpmyadmin

前端 未结 20 1440
一向
一向 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

    I stumbled on an article and this worked best for me

    1. Open up the config.inc.php file within the phpmyadmin dir with your favorite code editor. In your local MAMP environment, it should be located here:

    Hard Drive » Applications » MAMP » bin » config.inc.php

    1. Do a search for the phrase $cfg[‘UploadDir’] – it’s going to look like this:

    $cfg['UploadDir'] = '';

    1. Change it to look like this:

    $cfg['UploadDir'] = 'upload';

    1. Then, within that phpmyadmin dir, create a new folder & name it upload.

    2. Take that large .sql file that you’re trying to import, and put it in that new upload folder.

    3. Now, the next time you go to import a database into phpMyAdmin, you’ll see a new dropdown field right below the standard browse area in your “File to Import” section.

提交回复
热议问题