I’m quite a beginner when it comes to working with networks and the like, so apologizes up front. A while back I set up a mySQL database locally on my machine, and have built a number of simple programs that work with it. (aka root:localhost sort of thing).
This has been great, but I’m now hoping to allow other colleagues at my work to access the database from their machines, but I have no idea how.
Likely there will be some network protection issues (firewalls etc), so that may need to be taken into account… (although I have IT’s help on this, neither IT or myself really know what is required to ‘connect’ to the database).
For example, is it just an IP I need? Do I have to change the setup of my database? I understand that localhost would not work from my colleagues computer’s, for obvious reasons, I have no idea what would go in its place for others to access it.
I also do not mind having my machine run as the dedicated database machine… I would not be able to run it off a dedicated server or anything like that, beyond my machine.
Any help would be much appreciated!
Thanks.
First of all, what your colleagues need are:
running.
When you create user in MySQL the have to be something like this:
That means, the user will work if you connect from localhost with the user root. So you can create user allowed to connect from anywhere:
And finally you have be careful about what privileges are you granting to them. Do not forget to comment a line in the options file of the MySQL that says “bind-address” (this options prevents remote connection).