Solved

restrict mysql db access by ip range using remote access

Posted on 2008-06-16
6
1,911 Views
Last Modified: 2010-04-21
HI
I have an ODBC connection to MYQL DB on a hosted server and want to allow a codeveloper make this connection also. However he gets an error refusing access form his IP but I do not know where to make a setting that will permit him. In fact I can't find where the setting is that permits my IP or network to make the conenction.

The firewall is off (temporaririly) so thats not the cause. Any ideas?
0
Comment
Question by:ciaranoco
6 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 130 total points
ID: 21794724
When granting permissions you need to set both username and hostname or ip. What tool are you using for your mysql user management?
0
 

Author Comment

by:ciaranoco
ID: 21794771
we are using a single admin user access to the MYSQL DB. When my codeveloper connects from  my network the connection is fine but from his 'open' network (no firewall) he cannot connect.

many thanks
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 60 total points
ID: 21794909
Get the MYSQL GUI tools at http://dev.mysql.com/downloads/gui-tools/5.0.html.

You might need to contact the host and request that they add his IP/login.

Try the following.  Login into mysql using the command line tool.
run select * from mysql.user where User='username'

What you are looking for is the first column.  If the first column is a specific hostname/Ip or %(any host).  You need to add a user from the remote location you then might also configure DB access. The GUI tool makes it simple, but changes can also be done on the command line.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Assisted Solution

by:raheel_lips
raheel_lips earned 30 total points
ID: 21794985
Are you using php 5 or php 4?
If you are using PHP 5, so try one of the following.

I think you will get rid of your problem.

Regards,
Raheel

1. mysql_connect('localhost:/tmp/mysql.sock', 'user', 'password');

                                OR

2. mysql_connect('your-IP:/tmp/mysql.sock', 'user', 'password');

                                OR

3. mysql_connect('localhost', 'user', 'password');

Open in new window

0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 30 total points
ID: 21795124
The actual instructions for what you want are here:

http://dev.mysql.com/doc/refman/5.1/en/user-account-management.html

Specifically, you'll want to grant usage and other access to 'username'@'w.x.y.z'.  All the GUI front-ends I have seen allow for this in their interface.  You can also use the GRANT commands directly in the MySQL command-line client.
0
 

Author Closing Comment

by:ciaranoco
ID: 31467658
Thanks for your input guys.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
I've written this article to illustrate how we can implement a Dynamic Multipoint VPN (DMVPN) with both hub and spokes having a dynamically assigned non-broadcast multiple-access (NBMA) network IP (public IP). Here is the basic setup of DMVPN Pha…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now