555
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829
  1. # Set the database credentials
  2. sudo apt-get update
  3. sudo apt-get -y install cifs-utils
  4. cd /
  5. mkdir mysql_backup
  6. sleep 2
  7. sudo chmod 777 mysql_backup
  8. sleep 2
  9. sudo mount //10.10.5.26/trias /mysql_backup/ -o username='baptist',password='2021Bbh',domain='bbh'
  10. sleep 2
  11. cd /mysql_backup/
  12. ls
  13. DB_USER="root"
  14. DB_PASS="root@123"
  15. DB_NAME="triq_demo"
  16. # Set the backup directory
  17. echo "Enter the name of backup file: "
  18. read fileName
  19. BACKUP_FILE="/mysql_backup/$fileName"
  20. mysql -u $DB_USER -p$DB_PASS -e "CREATE database triq_demo;"
  21. # Restore backup file
  22. mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE