Professional Web Applications Themes

A simple "HOW TO" question; - MySQL

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

  1. #1

    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

    PPL-A Guest

  2. #2

    Default Re: A simple "HOW TO" question;

    PPL-A (Canada) wrote: 

    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/en/batch-commands.html

    Regards,
    Bill K.
    Bill Guest

  3. #3

    Default Re: A simple "HOW TO" question;

    On 30 Nov 2006 12:35:11 -0800, PPL-A (Canada) wrote: 

    It'd be a help to see what command you're attempting, and what the error
    message spit back is...

    --
    Mares eat oats, and does eat oats, and little lambs eat ivy,
    A kid will eat ivy too, wouldn't you?
    Peter Guest

  4. #4

    Default Re: A simple "HOW TO" question;

    Bill Karwin wrote: 
    >
    >
    > 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/en/batch-commands.html
    >
    > Regards,
    > Bill K.[/ref]

    I believe that should be:

    mysql < source filename.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    net
    ==================
    Jerry Guest

  5. #5

    Default Re: A simple "HOW TO" question;

    Jerry Stuckle wrote: 

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

Similar Threads

  1. SMTP: "to" or/and "recipient" question.
    By Serguei.Goumeniouk@cibc.ca in forum PERL Modules
    Replies: 1
    Last Post: November 11th, 06:31 PM
  2. CFINPUT type="radio" w/ "value" requires "label"
    By Iceborer in forum Macromedia ColdFusion
    Replies: 2
    Last Post: February 21st, 06:16 PM
  3. Question about "Public Sub" vs "Private Sub" vs "Sub"
    By michaaal in forum ASP Database
    Replies: 1
    Last Post: October 18th, 07:15 PM
  4. Replies: 3
    Last Post: September 4th, 04:05 PM
  5. Replies: 3
    Last Post: July 23rd, 07:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139