Re: accessing mysql on non default port - windows

From: Date: Sat, 05 Feb 2005 23:59:39 +0000
Subject: Re: accessing mysql on non default port - windows
References: 1 2  Groups: php.db php.db 
Request: Send a blank email to php-db+get-38479@lists.php.net to get a copy of this message
Jason Wong wrote:
On Sunday 06 February 2005 04:58, Jeff wrote:
Hi. I need to access mysql from windows to *nix on both the default port of 3306 and a secondary port of 3307. php.ini states that win32 will only pay attention to MYSQL_PORT.
Just specify the port you want to use in mysql_connect().
Is there a way to change the value of that constant without compiling my own version of php on win32.
I think you're misunderstanding what those comments are saying. If you don't specify a port in mysql_connect() then PHP will try to use what is defined by mysql.default_port in php.ini. If mysql.default_port is not defined *then* it will start loking at other places (as detailed in the comments). Thats what i thought as well, but each time i attempt to use the port in mysql_connect, i.e. 'localhost:3307' or if i change the mysql.default_port = 3307 and just use 'localhost' in the server argument, i get
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client - this using php 4.3.10, unfortunately i don't have the option of running 5. Of course the *nix client works like a champ, but from all the searching, it seems that the constant MYSQL_PORT is a compile time argument. since the client is built into the install, i figured i'd have to rebuild. another thing that is easy to do in *nix Have you succesfully connected from a php/mysql client to a mysql server running on 330[not 6] Thanks for the reply. Jeff

« previous php.db (#38479) next »