mysql

You are browsing the archives of mysql.

Access, FTP, PHP, MySQL – Part 3

Continuing with my series about using Access on a PC to feed a MySQL database on the web! Read part 3 here. This part describes the structure of the 2 databases involved. One is an MS Access database on a local PC. The other is a MySQL database on a webserver.

Remember that this method was created for websites that exist on servers that do NOT allow remote MySQL connections. Some servers do allow the remote connections, which simplifies the whole process.

Access, FTP, PHP, MySQL – Part 2

I have finally resumed my series about using Access on a PC to feed a MySQL database on the web! Read part 2 here. This part describes the purpose of the database and describes 2 of the websites that get fed by this little homegrown system.

Remember that this method was created for websites that exist on servers that do NOT allow remote MySQL connections. Some servers do allow the remote connections, which simplifies the whole process.

Access, PHP, and MySQL

There are times when I would love to enter data into an MS Access database on my local machine, and then pass that data to a MySQL database on a web site. However, firewall rules normally prevent accessing those databases from outside the network where the respective server machines are located.

How can I get around this?

In researching this question, one reasonably simple answer is to have a small slave program on the website that hosts the MySQL database. Your MS Access database then passes the data to this slave, which then adds the data to the database on the internet.

Specifically, the approach I took is this.

  • enter data into MS Access database on local machine
  • Access exports data to a text file (or you could get fancy and do XML output)
  • Access initiates an FTP command which transfer the text file to the website
  • Access initiates the slave program on the website
  • slave program reads the uploaded text file and inserts data into the MySQL database
  • text file is deleted from the website

The slave program is created using PHP.

Next posting will start a series that will give more details. In the meantime, you may want to play with this idea on your own and then compare with my solution later.

This posting also exists as an article on the main site. See it here.