BuckeyeTheDog Posted June 28, 2008 Share Posted June 28, 2008 Newbie here. Thanks for all your help! I seem to be struggling with setting up accounts and passwords using PHPMyAdmin (on MacOSX and Xampp). Using PHP, I can access my localroot when using the default "root" and no password. I have set up extra MySQL databases and seem to be able to access them with my root account and no password. But when I set up a new user and a password, I can't seem to make things work. I'm quite frustrated. I'm back to the most basic PHP code. As stated above, this code seems to work except when I try my account name and password... $cxn = mysqli_connect("localhost","flange1","xxx","buckeye") or die ("Couldn't connect to server."); I get this error code back... Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'flange1'@'localhost' (using password: YES) in /Applications/xampp/xamppfiles/htdocs/db_login 2.php on line 11 Couldn't connect to server. I'm guessing I am just not setting the account up in PHPMyAdmin correctly. Is there anything tricky about this? I have attached a jpg of that admin screen. Thanks! I'm going crazy here... [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted June 29, 2008 Share Posted June 29, 2008 Make sure the user is authorized to connect from "localhost" or "%" (all hosts). I don't remember how phpMyAdmin does it, but with some tools, if you don't specify a host (or explicitly tell it all hosts) it will create the account, but not allow access from any host. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.