Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- source $CONFIG
- do_query() {
- config=".my.cnf.$$"
- command=".mysql.$$"
- touch $config $command
- chmod 600 $config $command
- cat > "$config" << EOF
- [mysql]
- user=$db_adm
- password='$db_adm_pwd'
- EOF
- echo "$1" > $command
- mysql --defaults-file=$config < $command > /dev/null
- rval=$?
- rm -f $config $command
- return $rval
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement