Advertisement
Virajsinh

MySQL Database Import & Export Via Command Line

Sep 12th, 2022 (edited)
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Windows
  2. ======================
  3.  
  4. Export Database :
  5. mysqldump -u root -p DATABASE_NAME > d:/EXPORT_DATABASE_NAME.sql
  6.  
  7. Import Database :
  8. mysql -u root -p DATABASE_NAME < d:/IMPORT_DATABASE_NAME.sql
  9.  
  10. Mac
  11. =======================
  12. Database Import in Mac
  13. /Applications/xampp/xamppfiles/bin/mysql -u root -p DATABASE_NAME < /Users/MAC_USERNAME/Downloads/DATABASE_NAME.sql
  14.  
  15. Database Export in Mac
  16. /Applications/xampp/xamppfiles/bin/mysqldump -u root -p --databases DATABASE_NAME > /Users/MAC_USERNAME/Downloads/DATABASE_NAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement