RTFM!

Sep. 27th, 2001 11:52 am
alexpgp: (Default)
[personal profile] alexpgp
I had gone about as far as I could go the other day with my MySQL problem, which consisted primarily in not being able to gain access to the system even though I plainly had added a line to the 'user' table that gave the user named 'foo' access from any host (designated by '%') if the password 'bar' was supplied.

The folks over in the #mysql channel on the IRC OpenProjects net seemed a bit catatonic the couple of times I dropped in to ask why this might be the case. Feeling a little frantic, I dropped into the #livejournal channel, hoping someone there could help. Someone did, indirectly (fellow LJer [livejournal.com profile] dormando suggested I go RTFM, which I did, hitting the MySQL FAQ at the Bit By Bit web site).

And there it was, just what I needed, in section 4.2.10 (Causes of Access denied Errors):
A very common error is to insert a new entry with Host='%' and User='some_user', thinking that this will allow you to specify localhost to connect from the same machine. The reason that this doesn't work is that the default privileges include an entry with Host='localhost' and User=''. Because that entry has a Host value 'localhost' that is more specific than '%', it is used in preference to the new entry when connecting from localhost! The correct procedure is to insert a second entry with Host='localhost' and User='some_user', or to remove the entry with Host='localhost' and User=''.
The suggestion was followed, and now everything works fine.

Now to get down to some serious development, once I take care of some other matters. (There is a good chance I'll be getting a rather large rush job within a couple of hours.)

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 3rd, 2025 09:36 pm
Powered by Dreamwidth Studios