|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
![]() |
| Outils de la discussion | |
|
|