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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.