note 45029 added to function.mysql-connect

From: Date: Mon, 23 Aug 2004 21:10:04 +0000
Subject: note 45029 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-75181@lists.php.net to get a copy of this message
In MySQL4.1 and later, the default password hashing format has changed making it incompatible with 3.x clients. I found out mysql_connect() works on server versions >= 4.1 when your MySQL user password is blank because password authentication isn't done in that case, otherwise you need to use another connection method (e.g. mysqli). Also if you are using old MySQL tables on a new server (i.e. the passwords are stored in the old format), then the server will use the old auth method automatically and this function should work in all cases. Hopefully this will help someone, it had me confused for a while because some of the users on my 4.1 server could connect and some couldn't. ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45029 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45029&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45029&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75181) next »