Jump to content

ARRGGHH- Newbie database access problems


BuckeyeTheDog

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/112377-arrgghh-newbie-database-access-problems/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.