whenpenguinsattack.com

Tuesday, April 18, 2006

migrating from Microsoft access to mysql

By Justin Silverton

Why use mysql instead of access?

Cost. MySQL is free. Access is not. Mysql can also run on a variety of hardware and operating systems, which does not limit you to proprietary software.

Multiple-user access.
MySQL can handle many simultaneous users. It was designed from the ground up to run in a shared environment that is capable of taking on a large numbers of clients.

Management of large databases. MySQL can manage gigabytes of data, and more. This is possible in access, but not recommended.

Security. When Access tables are stored locally, anyone can run Access, and see your tables. It's possible to assign a database a password, but many people forget to do this. When your tables are stored in MySQL, the MySQL server manages security. Anyonetrying to access your data must know the proper user
name and password.

Centralized backup location. If individual Access users each store their data locally, backups can be more complicated: 200 users means 200 table backups. While some sites address this problem through the use of network backups, others deal with it by making backups the responsibility of individual machine owners--which usually means no backups at all. Mysql allows you to have one centralized location that can be backed up on a regular basis by a system administrator or DBA.

Manually transferring your data

One way to transfer your data is export all the data from each table (using the file->export command) to a comma delimited text file (CSV). It can then be imported back into mysql using the following commands (from the mysql console client):

mysql> use mydatabase;
mysql> LOAD DATA LOCAL INFILE 'my_access_table.txt'
-> INTO TABLE mytable
-> FIELDS TERMINATED BY ',' ENCLOSED BY '"'
-> LINES TERMINATED BY '\r\n';

you could also use mysqlimport

mysqlimport --local --fields-terminated-by=,
--fields-enclosed-by='"'
--lines-terminated-by='\r\n'
mydatabase my_access_table.txt

using a program

The following are program you can use to transfer the tables for you:

DBTools (free) Works with Access97, Access2000. DBTools actually is intended primarily as an application for administering MySQL, but it includes data import capabilities that can be used to read Access databases for transfer to MySQL. (It can also read data from other sources such as Excel spreadsheets, making it particularly useful for transferring to MySQL information that is stored in a variety of formats.) Because DBTools reads Access databases directly, you can use it to migrate Access tables even if you don't have Access installed locally, as long as you have the database files containing the tables to be transferred. DBTools does not require ODBC.

MySQLFront (free 30 day trial) MySQLFront is similar in many ways to DBTools. It can read Access97 and Access2000 files directly. If ODBC is installed, MySQLFront can import information into MySQL from ODBC data sources over the network.

1 Comments:

  • MySQLFront is not free anymore, unless you think of a 30-day shareware as free... The last 'free to keep' version was 2.5

    By Anonymous djn, at 7:32 AM  

Post a Comment

Links to this post:

Create a Link

<< Home