Monday, 7 September 2009

Convert MDB to MySQL

There’re many ways to accomplish this request. Here is a quite simple one which could be performed in Linux.


Prerequisite(s): mdbtools installed (get it at: http://mdbtools.sourceforge.net/)

#1. Export tables list under CSV format
mdb-export database.mdb table_name

#2. Convert mdb into a format required by MySQL
mdb-schema database.mdb | mysql -u username -p database_name

#3. Import table content
mdb-export -I database.mdb table_name | sed -e 's/)$/);/' | mysql -u username -p database_name



Probably this needs to have some more improvements, later.

?»??_?????^?????_?????~??V?_????? – ?Ú?????«?

??g?_g????^?????_g????~????_g???? – ?????????

No comments:

Post a Comment