Importing Large Databases Into MAMP
Robert ShellApril 08, 2015
MAMP is a great tool for running servers locally, however, when you must export that site you have been developing locally and your database is huge, then you could have some problems with PHPMyAdmin.
IMPORT DATABASE INTO MAMP
- Open a new terminal window
- CAREFUL: This will replace all tables in the database you specify!
/applications/MAMP/library/bin/mysql -u [USERNAME] -p [DATABASE_NAME] < [PATH_TO_SQL_FILE]
- Hit the Enter Key
/applications/MAMP/library/bin/mysql -u root -p wordpress_db < /Applications/MAMP/htdocs/backupDB.sql
- Quick Tip: Don’t forget that you can simply drag the file into the terminal window and it will enter the location of the file for you.
- You should be prompted with the following line:
- Type your password, keep in mind that the letters will not appear, but they are there
- Hit the enter key
- Check if you database was successfully imported
- Navigate to phpMyAdmin in a browser