remote connection

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
harikrishnanair
Forum Newbie
Posts: 1
Joined: Wed Sep 16, 2009 1:55 am

remote connection

Post by harikrishnanair »

hi,

I have PHP installed on Server1 and mySQL installed on Server2. I am not able to connect to mySQL on Server2 from a php script on Server1. Needed extension is enabled in php.ini (php_mysql.dll). Extension_dir = "c:\php5\ext" which is also set correctly.

Can someone suggest what else has to be done for this to happen?

Thanks
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: remote connection

Post by VladSun »

1. Does MySQL listen to reachable-from-outside IPs - i.e. skip-networking option is disabled and it DOES NOT listen only on localhost (127.0.0.1)?

2. Check your server1/2 firewalls

3. Have you GRANTed the right permissions to the user - .i.e.
[sql]GRANT ALL ON my_database.* TO my_user@server_1_ip IDENTIFIED BY 'my_password'[/sql]
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply