byUsers Forums

for Users - by Users

You are not logged in.

Announcement

If you see a post that is objectionable, or appears to be spam, please use the "Report" button at the bottom of the post to let us know.

Thank-you.
  • Index
  •  » FAQs
  •  » Converting an MS Access database to MySQL

#1 15-04-2003 22:18:01

Jellyroll
Administrator
From: Magrathea
Registered: 28-03-2001
Posts: 12347
Karma: 3.142

Converting an MS Access database to MySQL

1nnThis is a little guide I recently wrote. I
hope it's of some use to people.nn*** INSTALLING THE MyODBC DRIVERS
***nnFirst things first, download the latest stable (NOT development unless
you know the risks!) MySQL ODBC drivers from the following
site:nhttp://www.mysql.com/downloads/api-myodbc.htmlnnGo for the full setup
for the version of Windows in use, should be about 1.5MbnnWhen the file has
downloaded, unzip it if necessary and run the setup file, then:na) Click
"Continue" on the welcome screen of the installer.nb) Single Click MySQL so
that it is highlighted.nc) Click OK.nd) In the Data Sources screen, just click
"Close".ne) You should get a message saying "Setup Succeeded!" - if you do,
click "Ok"nnThat's the actual installation of the MyODBC drivers, now to
configure them to connect to your MySQL database.nnThis varies slightly on the
version of Windows in use.nnFirst, go to the Control PanelnnIf using Win95
or 98 look for "32bit ODBC"nIf using WinMe look for "ODBC Data Sources
(32bit)"nIf using NT, look for "ODBC Data Sources"nIf using 2000 or XP go to
the "Administrative Tools" section, then "Data Sources (ODBC)"nnThe key
letters your looking for are ODBC - if they aren't in the places mentioned,
they should be in the Control Panel somewhere.nnWhen you find the relevant
ODBC icon, double click it.nn*** SETTING UP THE LINK TO YOUR MySQL DATABASE
***nnIf you want the MyODBC connection you're about to make to be accessible
by all users on the machine, click the "System DNS" tab.nIf you want it to be
accesible only from your user profile, click the "User DNS" tab.nn1) Click the
"Add" buttonn2) Scroll down and double-click "MySQL"nnA new window should
opennn3) THe following boxes should be on the screen - I have provided an
explanation of what they mean.nnWindows DSN name - This is the Data Source
Name, or "friendly" name that you will refer to this connection. It can simply
be called "link to my MySQL database" or whatever you like. Usually, the more
descriptive the better! ;-)nnMySQL Host (name or IP) - The address of the
server on which the MySQL database is held, i.e. mywebsite.com or
234.123.120.22. If it's running on your own machine, it would be localhost or
127.0.0.1nnMySQL database name - the name of your MySQL database (Nb.
database, NOT table! ;-)nnUser - the username required to gain entry to your
MySQL databasennPassword - the password to go with the usernamennPort (if
not 3306) - Almost always this will be blank (or 3306) unless whoever is hosting
the database has told you otherwisennSQL command on connect - Not usually
needed, but used to issue an initial command to the MySQL server as soon as the
connection is established.nnFrom the tick boxes below, tick the
following:nReturn matching rowsnChange BIGINT columns to INTnn4) Click
"Ok"n5) Click "Ok"nnThat's the bulk of the work done :-)nn*** EXPORTING
DATA FROM MS ACCESS INTO YOUR MySQL DATABASE ***nnAll the hard work is done
now.nn1) Open your MS Access databasennFor each table you want to export to
your MySQL, do the following.nn2) Right click on the table and choose
"Export..."n3) Leave filename blank, and click the downwards arrow next to the
"Save as type:" boxn4) Near or at the very bottom should be "ODBC Databases ()"
- choose thatn5) Enter the table name as it will be in the MySQL database -
Remember NO SPACES are allowed!n6) Click "Ok"n7) Click the "Machine Data
Source" tabn8) Double click the "friendly" DSN (Data Source Name) that you
created earliernnThat's it :-)nCheck that the data has gone across to the
MySQL database and table you specified. If it's worked, repeat steps 2 - 8 for
each table that needs converting.nnnn


Jellyroll Papadopoulos
A voice of madness in a sea of reason

Offline

#2 10-08-2003 16:56:51

anarki
Member
Registered: 22-10-2005
Posts: 0
Karma: 0

Re: Converting an MS Access database to MySQL

Use a nifty little program called access dump. :)nndoes
it all in 3 clicks.. ntakes care of the mysql and imports into phpmyadmin
easily. nn

Offline

#3 10-08-2003 17:05:47

elfin (Guest)
Member
Registered: 22-10-2005
Posts: 0
Karma: 0

Re: Converting an MS Access database to MySQL

nnI assume is to what you were
referring, thanks for the tip!

Offline

#4 10-08-2003 17:38:53

anarki
Member
Registered: 22-10-2005
Posts: 0
Karma: 0

Re: Converting an MS Access database to MySQL

Yep, too lazy to hunt down the link :)nneasy enuff
set-up thonnFile -> Open Access DatabasenTables -> Select All (Thats what i
do)nnDump -> All TablesnnThen, The Options.nnclick on Add Create Database,
Add Create Tables and finally click Include Records.nncreates a nice little
mysql txt file that imports into phpmyadmin. nVery nice program, and one worth
keeping. nnI find its easier to update the records in access and just drop the
whole database and re-import it than it is to update records via phpmyadmin. or
for that matter, via browser :)nnBut then, i have complete control over my
site.n

Offline

#5 13-08-2003 04:15:57

Number_6
Administrator
From: North West
Registered: 22-03-2001
Posts: 3280
Karma: 129
Website

Re: Converting an MS Access database to MySQL

Cheers for that ;D A bit less cumbersome than my
method ;D


Modern life, well it's rubbish - I'm holding on for tomorrow

Offline

#6 31-08-2003 01:38:21

bravo33
Poster
From: scotland
Registered: 30-07-2001
Posts: 70
Karma: 2

Re: Converting an MS Access database to MySQL

This sub-thread has been moved  by Jellyroll.nnThe
main post is still "open".
n

Last edited by Jellyroll (03-09-2003 12:04:13)


There will be no moon tonight - There will be two tomorrow night

Offline

#7 29-01-2004 09:55:26

chumps03
Novice Poster
From: Bogor, Indonesia
Registered: 29-01-2004
Posts: 2
Karma: 0
Website

Re: Converting an MS Access database to MySQL

Wow this works.. the first method is detail and
it works.. thanks a million.. and the info on accessdump is also very useful.
nnI've made it on my computer, but I need to connect with another computer,
there's a problem. After installing myODBC, and defining the database (it
connected OK  wink).. but when I tried to edit a data it said that another user is
updating the same record.. I haven't tried restarting it yet?  ??? maybe
there's a step I've been missing.


Peace and Luvnchumps03

Offline

#8 30-01-2004 21:40:46

Number_6
Administrator
From: North West
Registered: 22-03-2001
Posts: 3280
Karma: 129
Website

Re: Converting an MS Access database to MySQL

Thanks for the feedback on the step-by-step
method, much appreciated :)nnAs for the "another user is updating the same
record" problem, I'm not sure as I haven't seen it do this myself but it
sounds like maybe the record is open on both machines, and only one can actually
alter it.


Modern life, well it's rubbish - I'm holding on for tomorrow

Offline

#9 09-02-2004 08:07:48

chumps03
Novice Poster
From: Bogor, Indonesia
Registered: 29-01-2004
Posts: 2
Karma: 0
Website

Re: Converting an MS Access database to MySQL

it seems I need to renew the MSDA (Microsoft
Data Access).. but I haven't done this.. I hope it'll work :)nnthanks
anyway..


Peace and Luvnchumps03

Offline

#10 09-02-2004 08:16:38

Number_6
Administrator
From: North West
Registered: 22-03-2001
Posts: 3280
Karma: 129
Website

Re: Converting an MS Access database to MySQL

Hi smile I hope it does the trick :)nJust out of
curiousity, can you access it ok from the other machine if using a MySQL client
(like SQLYog or MySQL Front) or does that still give problems?


Modern life, well it's rubbish - I'm holding on for tomorrow

Offline

#11 08-01-2010 07:09:32

Attefsexeks
Guest

Re: Converting an MS Access database to MySQL

Hi I created a connection to a Microsoft Access database by using the wizard. Now in the server connections I see my data connection to the db. Im trying to create a method to compact the database, so I used JRO to do it. To do it however, an exclusive access is required, and when I try to call the method I get an exception. So my question is: how do I close this connection?
Thanks for any help guys

  • Index
  •  » FAQs
  •  » Converting an MS Access database to MySQL

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson