If you have access to the Linux module with mdbtools installed, you can use this shell Bash script (save as mdbconvert.sh):
#!/bin/bash TABLES=$(mdb-tables -1 $1) MUSER="root" MPASS="yourpassword" MDB="$2" MYSQL=$(which mysql) for t in $TABLES do $MYSQL -u $MUSER -p$MPASS $MDB -e "DROP TABLE IF EXISTS $t" done mdb-schema $1 mysql | $MYSQL -u $MUSER -p$MPASS $MDB for t in $TABLES do mdb-export -D '%Y-%m-%d %H:%M:%S' -I mysql $1 $t | $MYSQL -u $MUSER -p$MPASS $MDB done
To call it, simply name it as follows:
./mdbconvert.sh accessfile.mdb mysqldatabasename
It will import all tables and all data.
Nicolay77 Aug 09 '14 at 19:48 2014-08-09 19:48
source share