Can't Connect to MySQL running on different port!!

Support requests, bug reports, questions etc.
Locked
linuxmad
Can't Connect to MySQL running on different port!!

Post by linuxmad » Fri May 08, 2009 12:38

This I would think is a very important feature, and when in the install/set-up i set hostname to be "localhost:3307" to connect to my other mysql version. This fails.

I've just download and trying to test because i'm currently using NagiosQL but that seems to buggy and not quite up to expectations, so i'm looking to try something else and this looks like it could be pretty cool.

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: Can't Connect to MySQL running on different port!!

Post by agargiulo » Fri May 08, 2009 15:42

Thank you for the input. We will correct this in the upcoming version.

linuxmad

Re: Can't Connect to MySQL running on different port!!

Post by linuxmad » Fri May 08, 2009 16:08

Hello,

I've been able to get it working if specifying in the hostname area:-
[ip address]:[port number]

Where i had been trying "localhost:3307" it works when you use "127.0.0.1:3307". This is something i've read about on the net which relates to it not using TCP/IP standards or something when you specify a hostname, so changing it to IP Address and port number worked anyway.

Cheers

linuxmad

Re: Can't Connect to MySQL running on different port!!

Post by linuxmad » Fri May 08, 2009 16:13

Hi,

It was something i Read in here:-
http://uk.php.net/function.mysql-connect

Looking at the Notes section:-
Note: Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as Runtime Configuration in your PHP configuration and leave the server field blank.

This solved my issue, Hope it helps.

Cheers

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: Can't Connect to MySQL running on different port!!

Post by agargiulo » Fri May 08, 2009 16:15

Cool, thanks!

Locked