Scott Pippin wrote:
> I need to run a file called sms.sql from the command line. Is this
> possible and what is the syntax?
> Thanks in advance.
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread116046@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-kernel=nea-fast.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
/usr/bin/mysql -u user_name database < sms.sql
I added this to my .bashrc and saved my password in ~/.my.cnf
alias sql='/usr/bin/mysql -u xxx xxx '
then added
sq ()
{
sql < $1
}
which allows me to use
sq sms.sql
walt