#47594 [Opn->Fbk]: 'password' parameter in my.cnf not honored even with mysqli_options()
ID: 47594
Updated by: jani@php.net
Reported By: jarrod dot makin at heartinternet dot co dot uk
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: linux Centos 5.2
PHP Version: 5.2.9
New Comment:
"On Unix platforms, MySQL ignores configuration files that are
world-writable. This is intentional as a security measure."
So check the permissions first.
Previous Comments:
------------------------------------------------------------------------
[2009-03-08 00:23:36] jarrod dot makin at heartinternet dot co dot uk
Description:
------------
Just like http://bugs.php.net/bug.php?id=43812
OS: Centos 5.2
php: 5.2.8
msqli api: 5.1.30
mysql Ver 14.14 Distrib 5.1.30, for pc-linux-gnu (i686) using
readline
5.1
Contents of my.cnf
[client]
user = web35-poker
host = localhost
password = password
[mysql]
database = web35-poker
Reproduce code:
---------------
$db = mysqli_init();
$db->options(MYSQLI_READ_DEFAULT_FILE,'/path/to/file.cnf');
$db->real_connect();
if ( mysqli_connect_errno() ) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
Expected result:
----------------
I expect $db to be a database handle
Actual result:
--------------
The following error message:
Connect failed: Access denied for user 'web35-poker'@'localhost' (using
password: NO)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47594&edit=1
Thread (4 messages)