Skip to content
WJunction - Webmaster Forum

Bind remote Mysql user to Ip

Status
Not open for further replies.
Hello,

lets say that i have 2 servers one that has a database and the other that has a website that connects to this database


i enabled remote Mysql connection to the database on server1 for a user

the problem is that the user can access the database from any ip

i want it to access the database only from the server2 ip which has the site


Thanks
 

6 comments

Hello,

use firewall to drop all requests from other IPs and accept only from the IP of the server2.

Highest Regards
Mohammed H
 
Nvm i found how to do it

on creating any database user there is 3 feilds

User:
Password:
Host:

by putting the ip of server2 in Host this binds this user to this ip thus it cannot be accessed from any other ip than provided

an easy way to do this is by using mysqlcc (Mysql control center) if you are using Windows server

Thanks
 
Status
Not open for further replies.

About the author

T
Active Member · Joined
64
Messages
0
Reactions
6
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom