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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db connection

Status
Not open for further replies.

JamesGMills

Programmer
Aug 15, 2005
157
GB
Hi,

I have a mysql database running on my server and i want to let someone else connect to it.

Using cPanel and WHM on a Linux box.

This is the error we are getting on the other site:

Unable to connect to database server!
Host 'server14.******.com' is not allowed to connect to this MySQL server

How can i allow there server to connect?

Thanks

PS I posted this in teh database forum but nobody even made a reply so hope someone in here can help.

------------------------
 
I can't remember the specific procedure, but you need to add a MySQL user that has access rights from a remote machine. A % sign can be substituted for the host name, but again I can't remember the syntax. Perhaps that will get you started on the right path.
 
You should have access to phpmyadmin from which you can add users to the database. You can also add hosts that can access particular databases. These can be url or ip addresses. When adding users and hosts, you will also give them whatever permissions they will need to access the databases. If you have a specific question about phpmyadmin, you may want to go to their website and check the manual. The phpmyadmin has its own help and a link to their site.

 
Log in mysql and execute the following

Code:
grant all
on yourdb.*
to youruser@'%'
identified by "password"

The @'%' tells mysql that the user you are granting rights to can connect from everywhere.

QatQat


Life is what happens when you are making other plans.
 
A little more secure, you could change it to...
...to youruser@ip_address...

Unless they're a dhcp user.

Mark
 
Well pointed out Kozusnik, anyway even if you use a DHCP server, as long as your DNS is properly set up you can use the hostname.

QatQat


Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top