Access Denied nightmare - SUSE 10.1
Posted 03 July 2006 - 06:15 PM
PHP Version 5.1.2
MySQL Client API version 5.0.18
I can't get php5 to connect to mysql 5. With or without a password.
[pre]<html><body><h1>Test MySQL Database connection</h1>
//$mysql= new mysqli("localhost", "galewpuser", "galewppass", "galewp");
$mysql= new mysqli("localhost", "galewpuser", "", "galewp");
printf("Error: %s\n", mysqli_connect_error());
results of (1) with the correct password set with MySQL Administrator are
Error: Access denied for user 'galewpuser'@'localhost' (using password: YES)
results of (2) with password set to "" are
Error: Access denied for user ''@'localhost' to database 'galewp'
all privs are granted between galewpuser and the galewp database
no other privs are granted between galewpuser and any other catalogs.
I had this working on WinXP with php4 and mysql4 and had to use OLD_PASSWORDS to make it work. I thought that OLD_PASSWORDS were history in these "5" days.
see phpinfo attachement
[attachment deleted by admin]
Posted 03 July 2006 - 06:33 PM
Posted 03 July 2006 - 06:42 PM
This seems fairly straightforward. Nothing fancy. Just Apache2, mysql5 and php5...
Is there a FAQ somewhere of bonehead things to check?
I've checked everything that I know of from my previous experience on WinXP with A2,M4,P4 that worked fine.
Posted 03 July 2006 - 08:39 PM
So, under the username in MyAdmin / Users panel, select the user you want to change, right click and choose Add Host.
- Then choose Localhost
- then be sure and update the privs to include all the privs for the desired database's.
Yep, you would think that WILDCARD meant WILDCARD including LOCALHOST but it apparently does not.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users