AUTHOR'S MAIN SITE  »  OVERVIEW: client/ server work  »  Intro: MySQL  »  Setting up MySQL
Delicious.Com Bookmark this on Delicious    StumbleUpon.Com Recommend to StumbleUpon

Connecting remote users to a MySQL database

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a narrow window. With most browsers, pressing plus, minus or zero while the control key (ctrl) is held down will change the texts size. (Enlarge, reduce, restore to default, respectively.) (This is fully explained, and there are more tips, at my Power Browsing page.)

Page contents © TK Boyd, Sheepdog Software, 3/13.

Using Open Office's database ("Base") as front end for remote access to MySQL database

Accessing a MySQL server across the internet

This essay is somewhat skeletal at present... but I hope it will never- the- less guide and/ or comfort you.

Before you can use Base as your front end for remote access to a MySQL server, you need quite a few things in place. How to get them there is the subject of other tutorials from me.

Before you attempt remote access... it does work, by the way... get a MySQL server and an Open Office "Base" client, or front end, co-existing happily in a single PC.

Getting that set up may give you a few headaches... But it is a sophisticated system, with lots to recommend it. (Also free and multi-platform, I'm glad to say.)

Until that much is working, there is not point in starting on the challenges of extending it to allow remote access. You really will be making life difficult for yourself if you try to "run" before you are "walking" smoothly.

I've written elsewhere in general terms about MySQL, and client/ server computing. You can do it!

Early experiences to give us all hope....

I have got the following to seem to work, if only for a few "test it" experiments.

As I've said... on other pages, I've written up how to have a database on a MySQL server, with an Open Office Base front end/ client. With both server and client on the same PC. Be sure all of that is working well before you start the following extensions. I will be using the same MySQL server as before, on the PC it was initially set up on. The MySQL server is all you need for what follows. It is not necessary at this stage to upgrade to a WAMP or LAMP server... though I hope you will embark on that "fun", too, one day.

Connect one user across LAN

Before you can connect multiple concurrent users to the MySQL server, or even just one, but from "outside", from someplace out on the internet, the "WAN", beyond our LAN....

Before you can do either of those things, you will need to master some things which come up when you have the MySQL server on one PC, and the Open Office Base (or other client program) front end on a different PC on the LAN.

Go off and read the separate page about that, and then come back here (there's a link for you at the end of it) to read more about setting up remote access. (It should open in a new window or tab, so you can also get back here simply by closing the page about a single client using the MySQL server across the LAN.)

Connect one user across WAN

Once you know how to connect a user to the server via Open Office Base (using that as your client, your front end software) from another PC on the same LAN as the MySQL server's PC, the "extra stuff" you need to connect over the WAN isn't too terrible. Note: It really shouldn't matter what operating system is running in any of the machines.

(To be edited for smoother join!...)

As I have said at several prior points... it really isn't too hard to take the next few steps... IF you are starting from the right place. If you have everything set up properly so that you can use a MySQL server on your LAN from a different PC on the LAN, then here's what's left in order to access that server via the WAN.... (I will try to re-write this page in due course, and expand upon how you do these things...

Your router must either be at a static WIPA address (which is unlikely, if you are reading this), or you need to get yourself set up with a DDNS service. (Search down the page the link takes you to... there is an entry.. a way down the page.)

You will have to set up a rule (or several? I only had to do one) in your router's NAT service.

You may have to tell your router's firewall to let stuff in for the MySQL server... make those settings with care!

You may need to tell the fire wall and/or other anti-malware software in the client PC and/ or the server PC about the new activity which you wish to allow.

But it can be done! My apologies for not having the time to write those things out more fully just now!

Hmmm. Update to "connecting over WAN":

My initial tests were from a laptop I call NewSharon, which was on the same LAN as my MySQL server at the time, but, because I'd put the URL I use to access that LAN's router/ internet interface into the "Server" field, in the Database Wizard, I thought that NewSharon's traffic was going out of the LAN, and coming back in via the router. So I'd set up a user which was configured to communicate via the router's LIPA.

When I tried to access the server from actually in "the outside world", I got "Cannot connect", and something called a host, that looked like it might be the URL of the router on the coffee shop WiFi I was using.

While it is a Bad Idea, I am going to create a way into my MySQL server that will accept a connection from "just anyone"... but I will lock it down (I hope!) and give it read only access to just one schema.

Used MySQLWorkbench, as usual, to modify the users allowed access to the MySQL server. Created a new user with the right to connect via hosts defined by "%"... i.e., I think, any host. Set access to only the one database, and of all the various privileges which can be granted, allowed only "Select", as an "Object right".

Hurrah! That worked! In town. From the coffee shop, and from the internet connection of another helpful friend. (And the other, "accept connections from the LAN router" didn't work even from other networks out there in WAN-land. Coincidence? I don't think so. I think the WIPA of the requesting device gets passed through to the MySQL server... so it is "open the door wide", or "know in advance who will be calling". Sigh.


Have you heard of Flattr? Great new idea to make it easy for you to send small thank you$ to people who provide Good Stuff on the web. If you want to send $$erious thank yous, there are better ways, but for a small "tip" here and there, Flattr ticks a lot of boxes which no one else has found a way to do yet. Please at least check out my introduction to Flattr, if you haven't heard of it? "No obligation", as they say!

Editorial Philosophy

I dislike 'fancy' websites more concerned with a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Not everyone has fast broadband.

I present this material in a format aimed at to helping you USE it. There are two aspects to that: The way it is split up, and the way it is posted..

Please remember the material is copyright. (TK Boyd, 2006 and later) The procedures in the page just cited are suggested only for convenient personal use of the material, however, also....

Feel free to use this information in computer courses, etc, but a credit of the source, quoting the URL, would be appreciated. If you simply copy the pages to other web pages you will do your readers a disservice: Your copies won't stay current. Far better to link to the original pages, and then your readers will see up-to-date versions. For those who care- thank you. I have posted a page with more information on what copyright waivers I extend, and suggestions for those who wish to put this material on CDs, etc. (There is at least one prison using Sheepdog Software/ Sheepdog Guides material for inmate education. Situations do exist where good internet connections are not possible!)

Translations are welcomed. Tell me about yours, so I can post links to it. (More information at the page about copyright waivers.)

Ad from page's editor: Yes.. I do enjoy compiling these things for you... I hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

PLEASE >>> Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages <<< PLEASE

If you liked this tutorial, see my main webpage for more things from the same author.

Editor's email address. Suggestions welcomed!     - - -    Want a site hosted, or email? I like 1&1's services.

Valid HTML 4.01 Transitional Page WILL BE tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at Mostly passes. There were two "unknown attributes" in Google+ button code. Sigh.

One last bit of advice: Be sure you know all you need to about spyware.

. . . . . P a g e . . . E n d s . . . . .