Created
November 5, 2017 02:56
-
-
Save togume/83b4bf40e1528742374bbce338270f34 to your computer and use it in GitHub Desktop.
Shell script to convert Access DB to SQL - Requires mdbtools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TABLES=$(mdb-tables -1 $1) | |
for t in $TABLES | |
do | |
echo "DROP TABLE IF EXISTS $t;" | |
done | |
mdb-schema $1 mysql | |
for t in $TABLES | |
do | |
mdb-export -D '%Y-%m-%d %H:%M:%S' -I mysql $1 $t | |
done |
@jerryq27 your gist link is dead
@dartmann think i found it https://notes.tomcarlson.com/mdb-to-mysql
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made some adjustments to this script since I've had issues when I ran it
I wanted to submit a pull request, but I can't do that with gists, so I'll link a gist with the changes here instead.
Edit: Fixed broken link.