#1
  1. Senior Member
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2000
    Location
    Enschede, The Netherlands
    Posts
    1,527
    Rep Power
    16
    I'm trying to import a tab-seperated text-file (generated in windows) called leden.txt in a mysql-database (on a linux-machine).

    When using the following command:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    mysqlimport -u root --password='passwd' remind leden.txt -v
    [/quote]

    where 'remind' is the database and the table is called 'leden'

    Unfortunately, this result in the following error:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    Connecting to localhost
    Selecting database remind
    Loading data from SERVER file: /home/newedge/werkmap/leden.txt into leden
    mysqlimport: Error: Can't get stat of '/home/newedge/werkmap/leden.txt' (Errcode
    : 13), when using table: leden
    [/quote]

    Can somebody help me with this? On my Windows-PC this works, but for some reason it doesn't work now

    Mirax
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Not quite the right place to ask this question (You should've used the MySQL forum), but anyway...

    My best guess is that it's a problem with the line breaks in the file. UN*X and Windows use different escape characters for line breaks (if you were to view a Windows-generated TXT file in Unix it would show m where line breaks should be.) Run a 'dos2unix' on the file and it should work out okay.

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  4. #3
  5. Senior Member
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jun 2000
    Location
    Enschede, The Netherlands
    Posts
    1,527
    Rep Power
    16
    Oops.. you're right... this is more something for the MySQL forum
    (Had been working with PHP all day, so...)

    But, I already tried that one..
    Didn't work unfortunately.

    I solved it by letting a PHP-script take a record from one database and insert it into the other. Not a very fancy solution but it works

    Thnx for the help!!

    Mirax

Similar Threads

  1. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 06:50 PM
  2. syntax error : identifer 'Hole'
    By bootrecker in forum C Programming
    Replies: 2
    Last Post: February 2nd, 2004, 08:08 AM
  3. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  4. mysql: getting error description from error code
    By laker in forum PHP Development
    Replies: 1
    Last Post: January 21st, 2004, 06:03 AM
  5. I don't know what this error message means
    By lcham02 in forum Java Help
    Replies: 2
    Last Post: January 13th, 2004, 11:57 AM

IMN logo majestic logo threadwatch logo seochat tools logo