Thursday, April 08, 2004, 1:07:27 PM, b wrote:
> hi,

> Error 1064: You have an error in your SQL syntax. Check the manual that corresponds 
> to your mySQL for the right syntax to use near 'mysql -u root -p databasename 
> <scriptfile.sql' at line 1

> however, I tried this.

> \u database name;
> \. scriptfile.sql;

> This way I managed to load my table structure and my data. Is the first command 
> obsolete in mySQL ver 4.1.18?

mysql -u root -p databasename < some_file.sql

is not the command of mysql client. You should run it from the command line. For 
example, if MySQL dir is C:\mysql, you should run

C:\mysql\bin> mysql -u root -p databasename < file.sql

You can also execute SQL script file with mysql command source (\.)


> Victoria Reznichenko <[EMAIL PROTECTED]> wrote:
b> b wrote:
>>
>> Hi,
>>
>> I'm using mySQL 4.1.18 on Windows XP pro. I tried this syntax and I received error.
>>
>> mysql -u root -p databasename >
>> What is the right syntax for this.
>>
>> I managed to unpack my table structure from the same script into another machine on 
>> Win2000 Server. However, I remember I had to try so many times and I cannot 
>> remember the exact syntax.
>>

> Yes, it's correct.
> What error did you receive?



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to