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
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
todd_...@ssiresults.com mailto:todd_...@ssiresults.com wrote:
I'm looking for automation direction...
I've found many packages that sit on top
. 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 this I would appreciate the help.
--
Thanks for the assist,
Todd E Thomas
C: 515.778.6913
It's
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 right now.
--
Thanks for the assist,
Todd E Thomas
It's a frail music knits the world together.
-Robert Dana
--
MySQL General Mailing List