#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Lancaster, PA, USA
    Posts
    8
    Rep Power
    0
    I have a small Access database that I am attempting to export to MySQL. My service provider has MySQL and PHP on the server already. I am familar with table creation etc... However, I can't seem to get the import to work properly. I keep getting parse errors. I've exported the Access databse to a text file. Then I attempt the import into MySQL and I get a error message like this:

    MySQL said: parse error near 'n' ' at line 1

    I'm using an automated Control panel to do the import. I've tried doing it in the shell too. Any help will be greatly appreciated.

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    20
    Rep Power
    0
    My first guess is that you have pc newlines instead of unix linefeeds. Try opening the file in a text editor that will allow you the option of "Save as Unix text file" vs. "Save as PC text file." (UltraEdit is one.)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Manchester
    Posts
    16
    Rep Power
    0
    There are a number of utilities on php.net that will produce a text file from Access, containing complete SQL commands to feed into the mySQL monitor. You may also be able to find an ODBC add-in the exports Access directly to mySQL.

    Personally I was only using Access to read in a CSV, which I then discovered mySQL could do directly very easily.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Lakewood, CO, USA
    Posts
    8
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by gszczyrb:
    I have a small Access database that I am attempting to export to MySQL. My service provider has MySQL and PHP on the server already. I am familar with table creation etc... However, I can't seem to get the import to work properly. I keep getting parse errors. I've exported the Access databse to a text file. Then I attempt the import into MySQL and I get a error message like this:

    MySQL said: parse error near 'n' ' at line 1

    I'm using an automated Control panel to do the import. I've tried doing it in the shell too. Any help will be greatly appreciated.
    [/quote]

    Log into the server: $mysql -u yourname yourdbname<cr>
    password: *******

    mysql>

    Use this set of code, and you will be find.

    load data infile "/usr2/mysql/lube/import_data/vehicle1.txt" into table vehicle fields terminated by ',' enclosed by '"' lines terminated by 'n'

    The file "vehicle1.txt" is a "comma-delimited file", where ALL FILES are surrounded by quotes and separated by commas.

Similar Threads

  1. mysql - MS access linked tables has locked me from changing anything
    By alexmasters in forum Database Management
    Replies: 2
    Last Post: May 15th, 2004, 04:17 AM
  2. convert access to mysql: new scenario
    By bugga in forum MySQL Help
    Replies: 2
    Last Post: November 24th, 2003, 04:09 PM
  3. Errcode:13 . How to solve it on MySQL + Windows 2000
    By hankycheng in forum MySQL Help
    Replies: 28
    Last Post: August 3rd, 2003, 10:05 AM
  4. mysql and access 2k..some questions
    By hescominsoon in forum MySQL Help
    Replies: 0
    Last Post: June 28th, 2003, 07:38 PM
  5. ACCESS Requests to MYSQL
    By kiddo01 in forum MySQL Help
    Replies: 4
    Last Post: June 18th, 2003, 04:45 AM

IMN logo majestic logo threadwatch logo seochat tools logo