Discussion: Weird Scenario
Afficher un message
Vieux 30/09/2007, 21h14   #4
Brian Wakem
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Weird Scenario

undbund wrote:

> On Sep 30, 8:23 pm, Brian Wakem <n...@email.com> wrote:
>> undbund wrote:
>> > Hi I am in a situation that i don't know how to solve, Here it is,

>>
>> > I have written a script using PHP5 that uses MySQL5 database which is
>> > remotely hosted. When i run the script using local computer Apache
>> > 2.061, the script runs perfectly. When i run on demo server (hosted
>> > remotely) the script runs perfectly. The remote demo server is Apache/
>> > 1.3.33 using PHP4.4.6

>>
>> > But when i run on the live server i get the following error:
>> > Can't connect to MySQL server on 'xxx.xxx.xxx' (111)

>>
>> 111 = Connection refused.
>>
>> Is xxx.xxx.xxx listening on port 3306? Do you have permission to connect
>> to it?
>>
>> --
>> Brian Wakem

>
>
> Hi
>
> Thanks for your reply. I guess my script should be able to connect to
> remote MySQL Server from live server because I am able to connect from
> my remote demo server. How can you know on which port is MySQL running
> on and how can you give a remote server permission to connect to
> remote database?



$ nmap -p 3306 xxx.xxx.xxx

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-09-30 21:12 BST
Interesting ports on xxx.xxx.xxx:
PORT STATE SERVICE
3306/tcp open mysql

Nmap finished: 1 IP address (1 host up) scanned in 0.209 seconds


If nmap returns similar to the above then you can at least get past the
firewall.

Mysql permission are host based. Just because you can connect from one
machine does not mean you can connect from another.




--
Brian Wakem
  Réponse avec citation
 
Page generated in 0,06947 seconds with 9 queries