Archive Pages Design$type=blogging

How to import a large MySQL database dump into MAMP, Mac OS X


How to import a large MySQL database dump into MAMP, Mac OS X


If you are using MAMP for your local WordPress or PHP development on a Mac, you likely need to import huge MySQL database dump files (more then 32Mb) in your local environment.
You could increase the size of maximum uploads in your php.ini file, however if the dump is really big (over 100Mb), the operation can take ages to complete.
It is more covenient to do this using the command line, expecially since it’s just a one liner.
mysql -u {DB_USER_NAME} -p {DB_NAME} < {PATH/TO/MYSQL/DUMP/FILE.SQL}
Keep in mind that the default user for MySQL as set by MAMP is root with a password of root, and that you need the full path to MAMP binaries to run the mysql command on a default installation. The command becomes:
/Applications/MAMP/Library/bin/mysql -u root -p {DB_NAME} < {PATH/TO/MYSQL/DUMP/FILE.SQL}Note: Important-Please copy sql file and move to htdocs folder and then directly set path like /Applications/MAMP/htdocs/Your sql full name with .sql 
On Mac OS X you can simply drag and drop your file to the console to get the full path written for you. So you just have to:
  • Open the Terminal app;
  • Copy and paste this string to it:
    /Applications/MAMP/Library/bin/mysql -u root -p
  • Now, before you hit enter, type your MySQL database name followed by “<” and drag your SQL dump file to the Terminal so that the full path to it gets appended to the command.
  • Your command is complete! Hit enter and have faith. It will take a while for the dump to get imported.
Once the import is completed, the prompt will return. Please note that no success message is given, so go back to phpMyAdmin to verify if your data is there.

Best For You: /Applications/MAMP/Library/bin/mysql -u root -p careeranna_main < /Applications/MAMP/htdocs/roshan_careerana.sql


Name

MAMP movies MYSQL MySQL Interview Questions news php PHP Interview Questions React React Advaced Questions reviews slider Top 50 React Interview Questions Tutorial tutorials UFW
false
ltr
item
CodeVizz: How to import a large MySQL database dump into MAMP, Mac OS X
How to import a large MySQL database dump into MAMP, Mac OS X
CodeVizz
https://www.codevizz.com/2018/10/how-to-import-large-mysql-database-dump.html
https://www.codevizz.com/
https://www.codevizz.com/
https://www.codevizz.com/2018/10/how-to-import-large-mysql-database-dump.html
true
3366176187658761010
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago