Advertisement
Virajsinh

Export Database From Mac Shell Script

Nov 30th, 2022 (edited)
892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.32 KB | Source Code | 0 0
  1. #Export Database From Mac Shell Script Save "ANY_NAME.sh"
  2. # Set Permission "sudo chmod 755"
  3. #!/usr/bin/env bash
  4.  
  5. USERNAME=$(id -un) #Code By VeeRa
  6. DATE=$(date +"%Y_%m_%d_%H_%M_%S")
  7. /Applications/xampp/xamppfiles/bin/mysqldump -u root -p --databases EXPORT_DATABASE_NAME > /Users/$USERNAME/Downloads/export_db_$DATE.sql
Tags: mac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement