Bluehost.com Web Hosting $6.95

A simple "HOW TO" question;

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-30-2006
PPL-A (Canada)
 
Posts: n/a
Default A simple "HOW TO" question;

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

Reply With Quote
  #2 (permalink)  
Old 11-30-2006
Bill Karwin
 
Posts: n/a
Default Re: A simple "HOW TO" question;

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.
Reply With Quote
  #3 (permalink)  
Old 11-30-2006
Jerry Stuckle
 
Posts: n/a
Default Re: A simple "HOW TO" question;

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
==================
Reply With Quote
  #4 (permalink)  
Old 11-30-2006
Bill Karwin
 
Posts: n/a
Default Re: A simple "HOW TO" question;

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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:20 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0