Results 1 to 3 of 3

Thread: need to convert text files into mysql database

  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default need to convert text files into mysql database

    Hello,
    I need to convert text files into mysql database

    Thanks

  2. #2
    Senior Member
    Join Date
    Jul 2006
    Location
    India, Delhi
    Posts
    209
    Thanks
    3
    Thanked 1 Time in 1 Post
    Rep Power
    9

    Default

    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>

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Location
    Washington, US
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. convert perl code into binary executable
    By chandanperl in forum Coding in General
    Replies: 2
    Last Post: 12th January 2010, 01:03 PM
  2. how to do MYSQL online backup of huge database
    By manish_2479 in forum Databases servers
    Replies: 4
    Last Post: 12th July 2008, 12:36 PM
  3. text output to mysql
    By chebbab in forum Shell scripting
    Replies: 4
    Last Post: 26th November 2007, 07:29 PM
  4. ssh backup particular mysql table / database
    By brothers in forum Databases servers
    Replies: 11
    Last Post: 25th October 2007, 05:06 PM
  5. Appending text files
    By sparky in forum Shell scripting
    Replies: 13
    Last Post: 3rd April 2006, 04:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •