List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 7 2002 3:35pm
Subject:Re: Importing .sql files into database.
View as plain text  
At 12:06 +0200 3/7/02, Egor Egorov wrote:
>Josiah,
>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

Thread
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