NYCPHP Meetup

NYPHP.org

[nycphp-talk] How to run a script?

David Mintz dmintz at davidmintz.org
Wed Jun 8 14:10:47 EDT 2005


On Wed, 8 Jun 2005, Andrew Yochum wrote:

> > > On Wed, Jun 08, 2005 at 09:32:06AM -0700, jaime bermudez wrote:
 <snip />
> > I am doing this:
> >
> > mysql> mysql -h jbe -u root -D jaime -p < jaime.sql;
> > I get the following error:
> >
> > ERROR 1064 (42000)
>
> You're almost there.  Run the same command at your shell prompt instead
> of the mysql prompt.  In other words, don't login to the mysql command
> line client first.

Or, if you want to run jaime.sql once you are already sitting at the mysql
prompt:

mysql> \. /path/to/jaime.sql

I just noticed while doing a little fact-checking that apparently the
source file has to be in the same directory or a descendant directory of
the directory you were in when you launched mysql; you can't go back up
the tree. True?

---
David Mintz
http://davidmintz.org/



More information about the talk mailing list