[mythtv-users] How to automate a mysql script with a password
protected database?
William
wmunson at rochester.rr.com
Thu Apr 1 09:31:48 EST 2004
I am trying to automate a script to create mpg symlinks to recordings. My
sql database requires a password and I am trying to include the password in
the script rather than entering it by hand each time I run the script. Here
is the part of the script that pulls the data from mysql.
----------
# Command to return the sql rows. Must have -N !!A
$MYSQL="mysql -N -u root -p mythconverg";
$SQL="select chanid, starttime, endtime, title, subtitle from recorded order
by starttime";
$data=`echo $SQL | $MYSQL`;
----------
I have tried various things like
-p mypass
-p 'mypass'
etc but no joy. I am hoping someone with more sql background can point me in
the right direction.
TIA,
Bill
More information about the mythtv-users
mailing list