PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Weird Scenario
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Weird Scenario

Réponse
 
LinkBack Outils de la discussion
Vieux 30/09/2007, 08h20   #1
undbund
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Weird Scenario

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)

Can you guys give some hints as to why i am getting this error and how
can i solve this. Changing .cnf file of MySQL is out of the question
because i don't have access to it. Is there any other way around it,
maybe changig server settings etc,

Thanks for all your .
Undbund

  Réponse avec citation
Vieux 30/09/2007, 09h23   #2
Brian Wakem
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Weird Scenario

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
  Réponse avec citation
Vieux 30/09/2007, 10h14   #3
undbund
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Weird Scenario

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?

Thanks for your and suggestions,
Undbund

  Réponse avec citation
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
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16788 seconds with 12 queries