ENCRYPTED_PASS=$(echo -n "xyz@12345" | openssl enc -aes-256-cbc -a -salt)
Store it as below
BACKUP_PASS="$ENCRYPTED_PASS"
Decrypt as below if you intend to use somewhere
DECRYPTED_PASS=$(echo "$BACKUP_PASS" | openssl enc -aes-256-cbc -a -d -salt)
Use it as below in your script as below
👇
mysql -u your_username -p"$DECRYPTED_PASS" -h your_host your_database