A little bit easier of a way to do this could be the following command:

mysql -u[user] -h[host] -p [database] < [mysql dump file]

Make sure the database you're importing into is EMPTY (or at least the
TABLES you are importing to are empty...)

On 10/19/07, Werner Van Belle <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> If it is a dump you can pipe it into mysql. If you have a csv like file
> you
> can import it with LOAD DATA LOCAL INFILE like things. An example below:
>
> DROP TABLE IF EXISTS EnsgDescriptions;
> CREATE TABLE IF NOT EXISTS EnsgDescriptions
> (stable_id VARCHAR(128) PRIMARY KEY,
> description  VARCHAR(128));
> LOAD DATA LOCAL INFILE 'imports/ensgdescriptions.csv'
> INTO TABLE EnsgDescriptions;
> Wkr (don't write this in your script :-),
>
> --
> Dr. Werner Van Belle
> http://werner.sigtrans.org/
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>

Reply via email to