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

Connecting to remote MYSQL server

Status
Not open for further replies.

krappleby025

Programmer
Sep 6, 2001
347
NL
Hi all,

im trying to connect to a remote mysql server on someone elses computer. with there permission of course.. and i am using the following to allocate the ip

$host="***.***.***.***";

note the *** are actually the ip but i have removed them

when it try to run the script i get

Warning: Host '***.***.***.***' is not allowed to connect to this MySQL server in /home/httpd/vhosts/kra-computers.com/httpdocs/test_sites/linkadmin/includes/dbconnect2.php on line 6

any ideas

cheers
 
If i place localhost in the $host then it works on my server.. but on someone elses server with the ip address it will not work..

any ideas
 
krappleby025:
Ask the other hosting company which permissions they gave for the db-user you are trying to connect with.

eg. there might be some ip-specific settings.

Olav Alexander Mjelde
Admin & Webmaster
 
it is my own server..
there are only two avilalbe ip addresses on the server.. so one of htem must be for the MYSQL database,

one is for the websites, and the other is a dns...

 
Try on the remote machine a line like:
Code:
GRANT ALL PRIVILEGES ON test.* TO 'root'@'xx.xx.xx.xx'
and see if you can get to the tables from the root user ot the user you habe php running in (in which case change the root to whatever.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top