<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<pre><font color="#3333ff"><font color="#330033"></font></font></pre>
The following is how I would do it with BASH (sorry) ... just translate
SYNTAX to your requirement<br>
<pre><font color="#3333ff">
</font></pre>
<font color="#330033">db="mythconverg" <br>
</font><font color="#330033">userid="****" <br>
</font><font color="#330033">passwd="****"<br>
</font><font color="#330033">MYSQL="mysql --disable-pager --batch
-u$userid -p$passwd $db"<br>
SQL="select chanid, starttime, endtime, title, subtitle from recorded
order by starttime;"<br>
<br>
$MYSQL&nbsp; &lt;&lt; EOQ<br>
$SQL<br>
EOQ </font><br>
<br>
William wrote:<br>
<blockquote type="cite" cite="mid013301c417f6$1157fff0$0a00a8c0@bill">
  <pre wrap="">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

  </pre>
  <pre wrap="">
<hr width="90%" size="4">
_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a>
  </pre>
</blockquote>
</body>
</html>