Solved

restrict mysql db access by ip range using remote access

Posted on 2008-06-16
6
1,924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 79

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
Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

 
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 51

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

623 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