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 <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > 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 --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php