[PHP] a bottle in the sea...

2001-08-15 Thread rashkatsa

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 :
htmlheadtitletry/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]




Re: [PHP] a bottle in the sea...

2001-08-15 Thread Chris Hayes



 and i have this message :
 Warning: MySQL Connection Failed: Access denied for user: 
 'toto@localhost' (Using password: NO)

Hmmm i have the same problem every time i install mysql and php and somehow 
it disappears after a while. I dunno what i did to deserve that.

$sql_host   = 'localhost';
$sql_user   = 'root';
$sql_pass   = '12345';

So maybe the user toto is not known to MySQL? Read the mysql security 
section on adding users and giving them rights.

Chris

PS dear list, please don't flame me for using root as username, it's just 
for a windows system at home. 


-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
...for the future I see it as important that 
biologists show economists that economy has to adapt 
to ecology. Ecologists are too timid because they understand
there are multiple causes everywhere. That makes them modest. 
Economists don't have that problem - they always think 
about single cause-single result.
It is very important that economists also learn to understand
the concept of multiple causes.
Toos van Noordwijk-van Veen

Chris Hayes - Droef 99 - 6708 PS Wageningen - NL- [EMAIL PROTECTED]

-- 
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]