note 61609 added to function.mysql-connect

From: Date: Tue, 07 Feb 2006 22:42:32 +0000
Subject: note 61609 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-103237@lists.php.net to get a copy of this message
I know it's been covered a few times here but i'd like to add my two pence about the "Client does not support authentication protocol requested by server; consider upgrading MySQL client" error. Anthony Boyd and 2raptor (both of their posts are here) hit the nail on the head with their use of OLD_PASSWORD('whatever') command: SET PASSWORD FOR 'user'@'localhost' = OLD_PASSWORD('something'); This makes newer versions of MySQL (>4.1) use the old password hashing system (<4.0). But I (probably in my inexperience) couldn't figure out how to do it using the GRANT command. So, I used my grant command and then put the SET PASSWORD command after it: GRANT SELECT, INSERT, UPDATE, DELETE ON database.* TO 'user'@'localhost' IDENTIFIED BY 'something'; SET PASSWORD FOR 'user'@'localhost' = OLD_PASSWORD('something'); ...and then a: FLUSH PRIVILEGES; ...for good measure. It may be a little redundant but it does work. Hope that helps a few more folks with their PHP4/MySQL4.1 development. ---- Server IP: 84.18.202.180 Probable Submitter: 62.255.32.9 (proxied: 82.20.27.95) ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61609 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61609&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61609&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#103237) next »