This is a discussion on need to convert text files into mysql database within the Databases servers forums, part of the Mastering Servers category; Hello, I need to convert text files into mysql database Thanks...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| Sponsored Links | ||
|
|
|
|||
|
first confirm file has the structure and schema and having saved with sql extension.
now u can do 2 things 1: u can login in mysql and type "source" following by "path" of the file. 2: without logging in it, import it by issuing mysqldump or mysqlimport command. mysqlimport -f /path/of/the/file -d <database> |
|
|||
|
that's going to depend on if you need to translate your source files into CSV, tab-delimited, or what. MySQL can import CSV files in a clever way. If your dataset is large, filter it into tab-delimited and use LOAD DATA INFILE.
MySQL :: MySQL 5.0 Reference Manual :: 12.2.5 LOAD DATA INFILE Syntax MySQL :: MySQL 5.1 Reference Manual :: 13.11 The CSV Storage Engine Good luck! |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to do MYSQL online backup of huge database | manish_2479 | Databases servers | 4 | 07-12-2008 12:36 PM |
| convert perl code into binary executable | chandanperl | Coding in General | 0 | 03-13-2008 10:43 AM |
| text output to mysql | chebbab | Shell scripting | 4 | 11-26-2007 07:29 PM |
| ssh backup particular mysql table / database | brothers | Databases servers | 11 | 10-25-2007 05:06 PM |
| Appending text files | sparky | Shell scripting | 13 | 04-03-2006 04:43 PM |