vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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/ |
| ||||
| 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 <werner@sigtrans.org> 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/mysql?unsub=c...tler@gmail.com > > |
| Thread Tools | |
| Display Modes | |
|
|