faqts : Computers : Databases : MySQL : Shell Commands : mysqlimport

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

40 of 47 people (85%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Do I need to create the table before using mysqlimport?
Does mysqlimport create tables?

Mar 23rd, 2001 14:51
Chris Kotyk, Nathan Wallace,


You need to create the table first.  The mysqlimport utility expects a
table with the same name as the text file be present in the desired
database.

mysqlimport IMPORTS data, it does not create tables...

Use CREATE TABLE to build the appropriate table structure that will
eventually hold the data contained in your filename.txt.  Once the table
has been created, you can re-run your import.

See the manual:

    http://www.mysql.com/doc/m/y/mysqlimport.html
    http://www.mysql.com/doc/C/R/CREATE_TABLE.html
    http://www.mysql.com/doc/L/O/LOAD_DATA.html