At 8:53 -0500 3/2/03, [EMAIL PROTECTED] wrote:
I'm doing all kinds of exercises and tutorials to get up to speed on MySQL
on my PowerBook with OS X.2 running. I just tried an exercise that, for the
first time, had me creating a table not right in the MySQL monitor, but,
rather, via a script that I saved as a textfile--Temp.sql--and then call
the script up from the command line in the MySQL monitor.

Here's the script:

CREATE DATABASE Temp;
USE DATABASE Temp;
CREATE TABLE Test_Table
        (Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
        Test_Name VARCHAR(30),
        Test_Date DATETIME,
        Test_Giver VARCHAR(30));
INSERT INTO Test_Table
        (Test_ID, Test_Name, Test_Date, Test_Giver)
        VALUES
                (NULL, 'Test','2000-03-02','Etienne');

The line I used to call the script up is:

bin/mysql -p <bin/mysql -p </[the complete pathname, honest]/Temp.sql

I didn't get the expected result, receiving the following message:

ERROR 1064: You have an error in your SQL syntax near 'bin/mysql -p
</Users/stephent/Sites/Temp.sql' at line 1

Can anyone see what I've done wrong?

Type the command at the shell prompt, not after you've already invoked mysql. The error message is from mysql itself; it indicates that you typed a shell command to mysql.


Thank you.


Steve Tiano

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


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



Reply via email to