Edit report at https://bugs.php.net/bug.php?id=60844&edit=1

 ID:                 60844
 Updated by:         johan...@php.net
 Reported by:        FM_Silver at gmx dot de
 Summary:            mysqlnd does not work with non-native pluggable
                     authentication
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
 Package:            MySQL related
 Operating System:   Debian 6.0.3
 PHP Version:        5.3.9
 Block user comment: N
 Private report:     N

 New Comment:

Pluggable authentication support was added to PHP 5.4. The auth_socket plugin 
works there:

mysql> CREATE USER 'johannes'@'localhost' IDENTIFIED WITH auth_socket;
mysql> exit
$ whoami
johannes
$ php54 -r '$mysqli = new mysqli("localhost", "johannes", "", "test", 0, 
"/tmp/mysql55.sock"); echo $mysqli->query("show grants")->fetch_row()[0];'
GRANT USAGE ON *.* TO 'johannes'@'localhost'


Previous Comments:
------------------------------------------------------------------------
[2012-01-23 01:00:16] FM_Silver at gmx dot de

Description:
------------
Using mysql 5.5.19, loaded auth_socket plugin and created a user to auth with 
it:

mysql> INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';
mysql> CREATE USER 'someuser'@'localhost' IDENTIFIED WITH auth_socket;

Also assume an existing database 'website'.

Trying to auth with user someuser works, when using the mysql client, but fails 
with mysqlnd as shown below.

Test script:
---------------
<?php
$mysqli = new mysqli("localhost", "someuser", "", "website");

if (mysqli_connect_errno()) {
        printf("Connect failed: %s\n", mysqli_connect_error());
            exit();
}

printf("Host information: %s\n", $mysqli->host_info);

$mysqli->close();
?>

Expected result:
----------------
Host information: Localhost via UNIX socket

Actual result:
--------------
PHP Warning:  mysqli::mysqli(): (08004/1251): Client does not support 
authentication protocol requested by server; consider upgrading MySQL client in 
/home/someuser/mysql.php on line 2
PHP Stack trace:
PHP   1. {main}() /home/someuser/mysql.php:0
PHP   2. mysqli->mysqli() /home/someuser/mysql.php:2
Connect failed: Client does not support authentication protocol requested by 
server; consider upgrading MySQL client


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60844&edit=1

Reply via email to