Page 1 of 1

Connecting to MYSQL database on remote server

Posted: Fri Sep 19, 2003 6:28 am
by agadgil
I want to connect to a mysql database remotely.
For instance,
I am connecting to mysql database server at 192.138.1.102 from my server say, 'myservername'
mysql_connect("192.138.1.102", user, pwd)
When I exceute this through my php page I cannot connect to the server.
It gives an error suggesting 'user@myservername' has no access to the database.

Posted: Fri Sep 19, 2003 6:32 am
by twigletmac
Have you got the permissions to access the database via an IP other than localhost? You need to make sure that your username has these permissions otherwise you will be denied access.

Is this your own database server or is it on a hosted machine?

Mac

Posted: Fri Sep 19, 2003 6:37 am
by agadgil
What kind of permissions will I require?
I can access the database that is on 192.128.1.102 from the same machine with the help of user and password that I am passing to the function mysql_connect.

Posted: Fri Sep 19, 2003 6:39 am
by agadgil
Do I require to have "user@myservername" as a user registered at 192.138.1.102?

Posted: Fri Sep 19, 2003 7:22 am
by twigletmac
Is this your own database server or is it on a hosted machine?

Mac