Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql over vpn 1

Status
Not open for further replies.

ipi2405

Programmer
Dec 2, 2009
1
ID
hi
i'm new in this forum, and need your help
is it possible to work with mysql over vpn (virtual private network) for multi user at the same time ?

thank's
 
Yes it is. It may not work out of the box though. That all depends on how you set up the database and users.

First, networking should be switched on (it usually is) and listening to more than one address (on Ubuntu, for example, it is very easy to tie the MySQL server to 127.0.0.1 only). Note that for MySQL, 127.0.0.1 is not the same as localhost. "Localhost" does not use a network connection at all.

Second, your users should be able to authenticate from the VPN tunnel. The "MySQL end" of the tunnel has an IP range. Make sure the GRANTS for the MySQL users you want to connect with cover that network location also. For example:

Code:
GRANT SELECT ON SomeDatabase.* TO SomeUser@localhost
Will not grant any access from a network by itself.
Code:
GRANT SELECT ON SomeDatabase.* TO SomeUser@'127.0.0.1'
If added to the previous statement, it will allow network access for the local machine also (very handy for SSH tunnels)
Code:
GRANT SELECT ON SomeDatabase.* TO SomeUser@'192.168.0.%'
Allows network access from any IP in the range 192.168.0.0 to 192.168.0.255.

If you are not sure what the IP range is, ask your network administrator.

Oh, the VPN tunnel is just a network connection. MySQL itself cannot see the tunnel, so there is no difference in multi-user behaviour on the MySQL server part.

Good luck!


+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top