#34072 [Opn->Asn]: MySQL module can't connect if port is not 3306

From: Date: Wed, 10 Aug 2005 16:44:29 +0000
Subject: #34072 [Opn->Asn]: MySQL module can't connect if port is not 3306
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83328@lists.php.net to get a copy of this message
ID: 34072 Updated by: tony2001@php.net Reported By: pash_ka at fonbet dot info -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Windows XP PHP Version: 5.1.0b3 -Assigned To: +Assigned To: wez New Comment: Wez, could you plz check it out? Previous Comments: ------------------------------------------------------------------------ [2005-08-10 18:44:18] tony2001@php.net I've just copied your DSN and it worked for me. But IIRC it's possible that it automagically uses local socket on my Linux, which is not available on Win32. ------------------------------------------------------------------------ [2005-08-10 18:38:40] pash_ka at fonbet dot info Well, I've just downloaded php5-win32-latest.zip - it's the same one (Aug 9 2005 ) and tried with it. The bug is still there for me. Do i need to use "mysql:host=localhost;port=6733;dbname=www" dsn or there is another syntax to specify port? ------------------------------------------------------------------------ [2005-08-10 18:22:42] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Can't reproduce. ------------------------------------------------------------------------ [2005-08-10 18:16:05] pash_ka at fonbet dot info And yes, I've tried with port 3306 - it works fine. And it also works fine with my non-standart port using mysql_connect(). So it's definetly a bug or missing future in PDO. ------------------------------------------------------------------------ [2005-08-10 18:11:30] pash_ka at fonbet dot info Description: ------------ I can't connect with my MySQL server running on localhost using non-standart port. I've tried dsn mysql:host=localhost;port=6733;dbname=www (resulted with "Can't connect to MySQL server on 'localhost' (10061)" error) mysql:host=localhost:6733;dbname=www (resulted with "Unknown MySQL server host 'localhost:6733' (11001)" error) I've also tried to use ini_set('mysql.default_port', 6733); and set in php.ini I've tried it with PHP 5.1 beta3 and with php_pdo_mysql.dll from "php5-win32-latest.zip" (09.08.2005). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34072&edit=1

« previous php.bugs (#83328) next »