Re: mysql_connect problem
Posted by:
RiggsFolly
(---.ppp.as43234.net)
Date: October 11, 2012 10:26AM
Yes you did but something is wrong with the user you created because the standard root user works fine.
I am just trying to home in on the problem.
If you have setup a user, lets say admin and added a password for it and set it so it is allowed access from localhost and you dont put a password on the mysql_connect like this
$link = mysql_connect('localhost','admin','');
You get this error
Access denied for user 'admin'@'localhost' (using password: NO) in an XDEBUG big orange error message.
If you use the wrong password you get this output
$link = mysql_connect('localhost','admin','xxxx');
Access denied for user 'admin'@'localhost' (using password: YES) in an XDEBUG big orange error message.
NOTICE that mysql users are location specific i.e. If i setup a user called admin I also have to say the that user is allowed from 1. a specific ip ( localhost ) or 2. a range of ip's 192.168.1.* or 3. any ip ( a bit dangerous).
Using phpMyAdmin have a look at this page
From the first page phpMyAdmin shows you when you launch it click the 'Users' menu you should get to a screen called 'Users overview'.
What does it say in the HOST column for your new user?