Pergunta

I have tried some tools (such as mysql migration toolkit and bullzip's Access To MySQL utility.) that convert a ms access database to mysql which all successfully create the database, tables and insert the data.

What they do not appear to do is recreate the relationships (constaints) from the original ms access database into mysql.

Are there any utilities that can recreate the database, tables and data with the correct relationships? Thanks

Foi útil?

Solução

Yes, there are tools which do that for you:

I would always take care using tools like these for conversions, especially relationships - you never know if they forget some relationship or convert fieldtypes wrongly. So you better make sure to manually check everything afterwards.

Outras dicas

I have written a VBA code to identify relationships and export it to MySQL:

http://en.latindevelopers.com/ivancp/2012/ms-access-to-mysql-with-relationships/

You can run the generated SQL code on MySQL after use free tools.

Gist: https://gist.github.com/ivancp/9655326

enter image description here

Regards.

Open your database, then export your all tables separated with commas to txt files, then rebuild manually your relationships, that's the proper way

You can export MS Access tables using Access to any database, MySQL for example. Just go to Object menu, which has Table,Queries, Forms, Report, etc. Click on the table you want to convert to MySQL. Right click, select 'Export'. Scroll 'Save as Type', select ODBC Database.( if you are don't have a MySQL ODBC datasource, this will let you set one up for the first time, you don't have the MySQL drivers, download them from www.MySQL.com --google it). Export window comes up, click ok. Choose your MySQL ODBC datasource in Machine DataSource, after you setup MySQL ODBC datasource.(Your first table export, setup MYSQL ODBC DATASOURCE, SEND TABLE just go to Machine DataSource)

Do this for all tables! You have your MySQL table from MS Access.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top