Simple - brilliant. I've modified to cat a temporary script...
1) cat the file as suggested:
cat > ~/payload/scripts/create_mysqldb.sql << EOF
###---
### Display the current user
###---
create database puppet;
###---
### Display all default accounts
###---
USE puppet;
###---
### Remove anonym
You could try it inside a "here" document:
mysql < Date: Thu, 29 Jul 2010 14:29:55 -0500
> From: todd_...@ssiresults.com
> To: mysql@lists.mysql.com
> Subject: Variable Expansion Using MySQL Client and .sql Files
>
> Hey all,
>
> I've found many packages that sit on top of MySQL for various clien