i am interested is it possible to create automated script to export single table from MS Access database in text file, and after that to have other script to automated import that text file in MySQL database, or maybe there is some better way to solve this kind of problem ? Also, server where is MS Access is running on windows , and MySQL service is working on Linux distribution CentOS. Thanks.
Asked
Active
Viewed 1,752 times
1
-
Automated export on what basis? (time, some sort of event etc)? – P.Salmon Nov 30 '16 at 13:49
-
@P.Salmon every day at a specified time – MPetrovic Nov 30 '16 at 13:50
-
2Here's a starter http://stackoverflow.com/questions/20245053/running-microsoft-access-as-a-scheduled-task – P.Salmon Nov 30 '16 at 13:51
-
@P.Salmon thank you! How can i now automate this macro? Is it possible to automate process from task schedule, and if answer is yes, how ? – MPetrovic Dec 01 '16 at 11:08
2 Answers
0
You can use jet-tool to get SQL dump of .mdb
file.
jet dump -f Your.mdb >dump.sql
Then import dump.sql
by means of MySQL.

Dmitry Sokolov
- 3,118
- 1
- 30
- 35
-
-
This tool lets you dump MS Access/MS Jet database schema as an SQL file containing the commands needed to recreate the database from the scratch. – Dmitry Sokolov Nov 30 '16 at 20:26
-
Does not support the accdb format, as in [.accdb support?](https://bitbucket.org/himselfv/jet-tool/issues/7/accdb-support#comment-37285824). – Sam Hobbs Aug 17 '17 at 00:52
0
I guess these two databases don't talk, or you should be able to export from MS Access and send the job straight to MY SQL. Is that right? Here is a script to do the export from Access to a text file.
Public Sub ExportTable()
DoCmd.OutputTo acOutputTable, "tblCustomer", acFormatTXT, _
"C:\BegVBA\Customer.txt"
End Sub
I haven't used MY SQL in a couple of years at least, and I don't have it setup on my machine now. Anyway, I think it would be something like this.
LOAD DATA INFILE '/tmp/mydata.txt' INTO TABLE PerformanceReport;
If that doesn't do the trick, you can easily Google it and figure it out yourself.

ASH
- 20,759
- 19
- 87
- 200