Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Location
    Athens - Greece
    Posts
    1

    Unanswered: import records in batch mode from command line

    hello its my first topic in that forums

    i need help about a simple thing, i need to upload 20MB records into a MySQL database of my website. if i use the Run SQL query/queries on database box ot the select the text file in phpMyAdmin a timeout error or an error like there isn't any sql command appears.

    the only way that i imagine is to seperate the sql text file into smaller files and make a partial upload.

    also i know that i can upload the 20MB file into my Server with ftp and connect from command line to mySQL give an import command in batch mode.

    is that possible because i have seen a person do it but i dont know how to do it. (that person it isn't very friendly with knowledge sharing)


    thank you
    Last edited by gmaniac; 04-11-03 at 04:14.

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: import records in batch mode from command line

    Originally posted by gmaniac
    hello its my first topic in that forums

    i need help about a simple thing, i need to upload 20MB records into a MySQL database of my website. if i use the Run SQL query/queries on database box ot the select the text file in phpMyAdmin a timeout error or an error like there isn't any sql command appears.

    the only way that i imagine is to seperate the sql text file into smaller files and make a partial upload.

    also i know that i can upload the 20MB file into my Server with ftp and connect from command line to mySQL give an import command in batch mode.

    is that possible because i have seen a person do it but i dont know how to do it. (that person it isn't very friendly with knowledge sharing)


    thank you
    Hi,

    YES you can do that. simply use ftp to transfer your 20MB file to the server, and then use telnet to import it into mysql. the syntax for that is LOAD DATA INFILE [file_name] INTO TABLE [table_name]

    or you can download mysql manual for further information.

    Am i friendly with knowledge sharing? let me know by getting back to forum if you can do it.

    qha_vn

  3. #3
    Join Date
    Jul 2003
    Posts
    4
    hi, could you give me one example of this script for upload file in mode batch using telnet?

Posting Permissions

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