Scrpting for mysql

Hi,
I want to run some queries in mysql. Also, I want to automate this process. So can someone help me with shell scripting??
I want to open mysql in terminal, type in the password and give some queries..
Can I write a script for d whole thing??

Are these "some queries" the same every time or are you doing them interactively? If the same every time, then a script (or shell function) would be reasonable. Otherwise, I recommend the mysql command line tool.