MAMP, import db by command line
- Open a new terminal windows
/applications/MAMP/library/bin/mysql -u [USERNAME] -p [DATABASE_NAME] < [PATH_TO_SQL_FILE]
- Hit the Enter Key
- Example:
/applications/MAMP/library/bin/mysql -u root -p wordpress_db < /Applications/MAMP/htdocs/backupDB.sql
- Quick Tip: You can simply drag the file into the terminal window and it will enter the location of the file for you.
If ask you a password, insert the database ones.
That’s all folks.
Andrea