<br><br><div class="gmail_quote">On Fri, Jul 1, 2011 at 12:40 PM, Avi <span dir="ltr"><<a href="mailto:lists@avi.co">lists@avi.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Amrit Pal Pathak wrote:<br>
<br>
> I used following code to make a database in mysql through bash<br>
> script.but it couldn't <a href="http://make.it" target="_blank">make.it</a> opens the mysql server in terminal<br>
> just.<br>
><br>
> mysql -u root -p<br>
> echo  "Enter password"<br>
> read a<br>
> create database test<br>
> echo "press ctrl+d "<br>
> echo "bye"<br>
<br>
</div>Because the<br>
<br>
mysql -u root -p<br>
<br>
is the command to get a shell in the mysql client, it's not a<br>
programming interface to mysql. The usual way to do this would be to do<br>
<br>
echo "create database test" | mysql -u root -pPassword<br>
   <meta http-equiv="content-type" content="text/html; charset=utf-8">echo "create database test" | mysql -u root -p<br></blockquote><div>        How can i pass the mysql root user's  password here   </div>
<div>        ?</div><div>     </div><div><br></div><div>     Thanks for support !!!</div><div>    </div><div>    <a href="http://amritpalpathakgne.wordpress.com">amritpalpathakgne.wordpress.com</a>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br></blockquote></div>