Ask the Expert

Updating MySQL database with Access data

Sorry if there is a simple answer to this. I have a local Access database which is updated every ten minutes using a scheduled task in Windows. 0 or more records are then dumped from Access to a .sql file on my local machine. I need a script/program that can connect to my remote SQL Server and execute the .sql file (containing 0 or more INSERT blah blah blah INTO blah statements) and then remove the local .sql file once complete. This is to run silently. If there is an easier way to update a MySQL database with only new records, I would also be interested.

Requires Free Membership to View

The upcoming MySQL Migration Toolkit is currently in Alpha and supports Access-MySQL migrations. If you have a .SQL file you can always write a batch file and run it at regular intervals.

The main command to concern yourself with is:

c:\pathto-mysql\bin\mysql -u [username] -p[YOURPASSWORD] [databasename] < c:\yourfile.sql 

This was first published in March 2005

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: