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
ASSWD_PRIV_ROOT') WHERE
User = 'root';
exit
---
It all works pretty well. Variable expansion is the problem. For now all
of my other scripts substitute $PASSWD_PRIV_ROOT (from my
1_GLOBAL_ENV.sh) for the actual password. The *.sql scripts do not.
If anyone can shed some light on
hlocalhost < file_with_allsql_you_need.sql
or
cat file_file_with_allsql_you_need.sql | mysql -u root -hlocalhost
and you are done.
On Tue, Jul 27, 2010 at 3:56 PM, Todd E Thomas
mailto:todd_...@ssiresults.com>> wrote:
I'm looking for automation direction...
I've found many packages that
7;admin'@'localhost' IDENTIFIED BY 'admin-password';
If there is a better way to do this than using expect I would greatly
appreciate any pointers in the right direction. Bash is comfortable for
me and perl is within reach. I'm not much versed in anything else rig