Importing large .sql files into phpMyAdmin under MAMP

1997

Ugh. I hate it when I’m trying to make modifications to an existing site and I can’t get the database to import because it’s too large. You end up with a lovely warning message like this:

 

This happens to me quite often, and I finally found a workaround for this within my local MAMP dev environment.

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

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

$cfg['UploadDir'] = '';

3. Change it to look like this:

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

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

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

6. 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, like this:

 

 


Warning: A non-numeric value encountered in /home/u351846396/domains/jsmwebsolutions.com/public_html/blog/wp-content/themes/Newspaper/includes/wp_booster/td_block.php on line 308