This is what I currently have:
#!/bin/bash
# Shell script to backup MySql database
MyUSER="root"
MyPASS="password123"
MYSQL="$mysql"
MYSQLDUMP="$mysqldump"
# Store list of databases
DBS=""
# Get all database list first
DBS="$($MYSQL -u $MyUSER -h -p$MyPASS -Bse 'show databases')"
for db in $DBS
do
The problem i have is the 'do' bit,
I need to write this into the shell.
After getting all the DB names do the following:
updated user set password="passowrd" where id = 999;
Can anyone assist?