This is a discussion on A simple "HOW TO" question; within the MySQL Database forums, part of the Database Forums category; Hello mySQL users; I am very new to this application and need some help ... I am trying to just use ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello mySQL users;
I am very new to this application and need some help ... I am trying to just use a command from within mySQL, and get syntax errors. I've even tried cutting and pasting the whole of the .sql files as text into the mySQL command line. I can see the database I've created, and one table ... master ... thats it. I know that the database .sql file that I have been given contains many tables and alot of data. How does one refer to a file that is sitting on the desktop of your computer in the correct syntax so that mySQL will talk to it, and load it in to my database? I am following along with the author of a "how to" book on the subject, and after answering one of my e-mails with advice that just re-iterated the instructions in the book (which did not work), I can't seem to get a further response ... must be a busy guy ... apparently he works for Verisign. Oh yeah ... I'm using Mac OS 10.3.9 on PPC 500Mhz with 512 MB and 300 GB of disk ... and mysql-standard-5.0.27-os10.3-powerpc. As soon as I create the database properly from within a terminal window I intend to do most of my work with a mySQL GUI, but for now none of the ones I've tried can properly create the database. Anyhow ... anyone who can tell me the correct syntax? Thanks so much! JI |
|
|||
|
PPL-A (Canada) wrote:
> How does one refer to a file that is sitting on the desktop of your > computer in the correct syntax so that mySQL will talk to it, and load > it in to my database? I use something like this: mysql> source filename; See also: http://dev.mysql.com/doc/refman/5.0/en/batch-mode.html http://dev.mysql.com/doc/refman/5.0/...-commands.html Regards, Bill K. |
|
|||
|
Bill Karwin wrote:
> PPL-A (Canada) wrote: > >> How does one refer to a file that is sitting on the desktop of your >> computer in the correct syntax so that mySQL will talk to it, and load >> it in to my database? > > > I use something like this: > > mysql> source filename; > > See also: > http://dev.mysql.com/doc/refman/5.0/en/batch-mode.html > http://dev.mysql.com/doc/refman/5.0/...-commands.html > > Regards, > Bill K. I believe that should be: mysql < source filename. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
Jerry Stuckle wrote:
> mysql < source filename. If you're at the mysql client prompt, you can use either of these forms: mysql> source filename mysql> \. filename If you're at a shell prompt, you can do this: $ mysql < filename At no time can you put two words after the shell input redirection arrow, like that: "< source filename". That's simply not valid shell syntax. Regards, Bill K. |