Hello !
I've read a lot of web, news and archives for two days and i've not
resolve my problem. Here it is :
Configuration : Apache 1.3.20 (Win32) / PHP 4.0.5 / MySQL 3.23.39 /
Windows 2000 Pro (SP2 and update ok).
Services : Apache and MySQL runs as services under 'toto' account.
Note : i use apache with php module
As written in http://www.mysql.com/doc/A/c/Access_denied.html, i've
checked all my mySQL configuration and it seems good. I can log on my
database with >mysql -u toto -p12345 titi and it works fine.
as they said : "If you are able to connect using the mysql client, there
is a problem with your program and not with the access privileges."
Note :
* select host,user from mysql.user gives (localhost,root) and
(localhost,toto)
* select host,db,user from db gives (localhost,toto,titi)
[I've removed anonymous users and hosts that are not 'localhost']
So look at the (very simple !) HTML/PHP :
<html><head><title>try</title></head>
<body>
<?php
$dbhost="localhost";
$dbuser="toto";
$dbpass="12345";
$dbname="titi";
$conn = mysql_connect($dbhost,$dbuser,$dbpass) or die("bad
Connection");
mysql_select_db($dbname,$conn) or die("titi database not found");
mysql_close($conn);
?>
</body></html>
and i have this message :
"Warning: MySQL Connection Failed: Access denied for user:
'toto@localhost' (Using password: NO)"
the only way to match this warning is to connect with mysql client
without the password : >mysql -u toto titi
"ERROR 1045: Access denied for user: 'dnd3e@localhost' (Using password: NO)"
[If it was a password that doesn't match i should find at the end (Using
password: YES), isn't it ? and with same parameters, the mysql client
connect without problems]
I conclude that PHP script connect without the password argument ! As it
seems impossible, i ask on this list some help
thanks for your help
regards,
rashkatsa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]