Forgot to change the "To" address to the list...

FCW

-----Original Message-----
From: Woolsey, Fred 
Sent: Friday, October 26, 2001 10:12 AM
To: 'Barbara Ferrell'
Subject: RE: how to run sql script in NT


Barbara,

You can "redirect" the script to mysql as input on the command line, like
this:

c:>mysql -u username --password=yourpassword databasename<path/temp.mysql

if you want to use a specifica database or

c:>mysql -u username --password=yourpassword<path/temp.mysql

if your sql script takes care of selecting the database (as yours does).

Hope this helps!

Chers,
Fred Woolsey

The "<" causes the sql file to be read as input commands by the mysql
client.  Also, this assumes you

-----Original Message-----
From: Barbara Ferrell [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 9:15 AM
To: [EMAIL PROTECTED]
Cc: barbara
Subject: how to run sql script in NT


i am extremely new at this:

i am on  NT4.0

i am in a DOS screen at the mysql prompt (mysql>)
the path that is described in the top of the window is: =3D
c:\apache\mysql\bin\mysql.exe


i wrote a script to create and load a database exactly as it said in the =
=3D
book..  i saved the file as ..Temp.sql

then i typed:
mysql> temp.sql ;          at the mysql prompt

it doesn't recognize the .sql file... how do I get it to run?



the temp.sql  file has this in it:

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-01-01', 'barb');












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

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