List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 7 2002 3:41pm
Subject:Re: Importing .sql files into database.
View as plain text  
At 9:35 -0600 3/7/02, Paul DuBois wrote:
>At 12:06 +0200 3/7/02, Egor Egorov wrote:
>>Thursday, March 07, 2002, 8:18:58 AM, you wrote:
>>JW> I know how to inport a .sql file into mysql by using mysql -u username -p
>>JW> password < filename.mysql(sql) but how do you import one that 
>>is made to go
>>JW> into a database you already have created? Would the command by mysql -u
>>JW> username -p password < dbname filename.sql(mysql)
>>Justa redirect the standard input from a file:
>>mysql database_name -u username -p password < filename.sql
>1. The database name goes after the options, not before.
>2. There can't be any space between -p and the password.
>mysql -u username -ppassword database_name < filename.sql
>>JW> Josiah Wallingford

Hm.  Well, after seeing *two* responses with the database name listed
prior to the options, I tried invoking mysql that way, and it worked.
Don't that beat all.  The mysql --help message still says the
db name follows the options, but I guess it's actually more forgiving.
Importing .sql files into database.Egor Egorov7 Mar
  • Re: Importing .sql files into database.Paul DuBois7 Mar
    • Re: Importing .sql files into database.Paul DuBois7 Mar