LOAD DATA INFILE issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Justin

    #1

    LOAD DATA INFILE issue

    Hi, im facing a problem here. First of all here is my program
    requirement. I got a .csv file with thousands of records inside, i need
    to import them into my mysql database. So i tried using load data
    infile on my pc using localhost everything goes fine, but when i change
    the connection to my server, it seems tat the connection cant be
    done... so wat went wrong?

  • Erwin Moller

    #2
    Re: LOAD DATA INFILE issue

    Justin wrote:
    [color=blue]
    > Hi, im facing a problem here. First of all here is my program
    > requirement. I got a .csv file with thousands of records inside, i need
    > to import them into my mysql database. So i tried using load data
    > infile on my pc using localhost everything goes fine, but when i change
    > the connection to my server, it seems tat the connection cant be
    > done... so wat went wrong?[/color]

    Hi,

    I guess LOAD DATA INFILE is a mysql command that loads data from a file into
    the db, right?
    If that is working on server1 and not on server2, I guess server2 uses
    different logincredential s (different username or password).
    OR you have a problem with readpermissions .
    Can the mySQL user READ the .csv file?

    *nix
    chmod the csv file to 777 if this a one time action.
    If you need to do this a lot, set the ReadWriteExecut e to the csv file to a
    more appropriate (restricted) level.

    W$
    Get the properties->security and make sure the file can be read by the
    process that runs mysql.

    Regards,
    Erwin Moller

    Comment

    • Paul Lautman

      #3
      Re: LOAD DATA INFILE issue

      Justin wrote:[color=blue]
      > Hi, im facing a problem here. First of all here is my program
      > requirement. I got a .csv file with thousands of records inside, i
      > need to import them into my mysql database. So i tried using load data
      > infile on my pc using localhost everything goes fine, but when i
      > change the connection to my server, it seems tat the connection cant
      > be done... so wat went wrong?[/color]

      Maybe your server only allows MySQL connections from localhost. This is
      quite common.


      Comment

      • Jerry Stuckle

        #4
        Re: LOAD DATA INFILE issue

        Justin wrote:[color=blue]
        > Hi, im facing a problem here. First of all here is my program
        > requirement. I got a .csv file with thousands of records inside, i need
        > to import them into my mysql database. So i tried using load data
        > infile on my pc using localhost everything goes fine, but when i change
        > the connection to my server, it seems tat the connection cant be
        > done... so wat went wrong?
        >[/color]

        Maybe you should try a mysql newsgroup such as comp.databases. mysql.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Ivan Marsh

          #5
          Re: LOAD DATA INFILE issue

          On Wed, 07 Jun 2006 02:20:19 -0700, Justin wrote:
          [color=blue]
          > Hi, im facing a problem here. First of all here is my program
          > requirement. I got a .csv file with thousands of records inside, i need
          > to import them into my mysql database. So i tried using load data infile
          > on my pc using localhost everything goes fine, but when i change the
          > connection to my server, it seems tat the connection cant be done... so
          > wat went wrong?[/color]

          Could be any number of things from a network issue to a database
          permissions issue. Are you getting any specific error message?

          --
          The USA Patriot Act is the most unpatriotic act in American history.
          Feingold-Obama '08 - Because the Constitution isn't history,
          It's the law.

          Comment

          • Justin

            #6
            Re: LOAD DATA INFILE issue

            thanx. i fixed the problem eventually... there was an mysql error code
            2 i think. it couldn read the csv file at first... so i uploaded the
            csv file into the ftp and tried for a few times and it was done... i
            think i was lucky though... so wat's the diff between load data local
            infile and load data infile??

            Ivan Marsh wrote:[color=blue]
            > On Wed, 07 Jun 2006 02:20:19 -0700, Justin wrote:
            >[color=green]
            > > Hi, im facing a problem here. First of all here is my program
            > > requirement. I got a .csv file with thousands of records inside, i need
            > > to import them into my mysql database. So i tried using load data infile
            > > on my pc using localhost everything goes fine, but when i change the
            > > connection to my server, it seems tat the connection cant be done... so
            > > wat went wrong?[/color]
            >
            > Could be any number of things from a network issue to a database
            > permissions issue. Are you getting any specific error message?
            >
            > --
            > The USA Patriot Act is the most unpatriotic act in American history.
            > Feingold-Obama '08 - Because the Constitution isn't history,
            > It's the law.[/color]

            Comment

            Working...