Skip to content

Instantly share code, notes, and snippets.

@pravashkarki
Last active December 23, 2022 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pravashkarki/5bb62ba9659a3cdfa70a1de65b3675eb to your computer and use it in GitHub Desktop.
Save pravashkarki/5bb62ba9659a3cdfa70a1de65b3675eb to your computer and use it in GitHub Desktop.
connect mysql mamp from terminal, export db, import db
Connect via Terminal (Run the code below)
/applications/MAMP/library/bin/mysql -uroot -proot
Exporting a MySQL database
mysqldump -uUSERNAME -p DATABASE > backup.sql
Importing a MySQL database
mysql -uUSERNAME -p DATABASE < backup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment