MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 8th, 2000, 02:32 PM
gszczyrb gszczyrb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Lancaster, PA, USA
Posts: 8 gszczyrb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.


Reply With Quote
  #2  
Old February 8th, 2000, 05:52 PM
elin elin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Posts: 20 elin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.)

Reply With Quote
  #3  
Old February 19th, 2000, 11:22 PM
Pharkas Pharkas is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Manchester
Posts: 16 Pharkas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #4  
Old February 22nd, 2000, 12:33 PM
dvanabel dvanabel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Lakewood, CO, USA
Posts: 8 dvanabel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > From MS Access to MySQL

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap