Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

restrict mysql db access by ip range using remote access

Posted on 2008-06-16
6
Medium Priority
?
1,941 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 390 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 180 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 2

Assisted Solution

by:raheel_lips
raheel_lips earned 90 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 90 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
Will you be ready when the clock on GDPR compliance runs out? Is GDPR even something you need to worry about? Find out more about the upcoming regulation changes and download our comprehensive GDPR checklist today !
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

705 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