note 47226 added to function.mysql-connect

From: Date: Sun, 07 Nov 2004 13:08:00 +0000
Subject: note 47226 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-80228@lists.php.net to get a copy of this message
The password hashing mechanism was updated in MySQL 4.1 and higher versions to provide better security and to reduce the risk of passwords being intercepted. Using the above mysql_connect() example, You can get an error when You connect : "Client does not support authentication protocol requested by server; consider upgrading MySQL client" This error occurs using PHP 5 - Mysql 5 too. You can solve this to create SHORT HASHES for Your passwords inside Your Mysql tables: # Connect to Mysql with mysql cli: #use mysql #SET PASSWORD FOR user = OLD_PASSWORD('your_password'); #SET PASSWORD FOR user@localhost = OLD_PASSWORD('your_password'); #flush privileges; reference: http://dev.mysql.com/doc/mysql/en/Password_hashing.html ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47226 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47226&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47226&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80228) next »