[PLUG] MySQL - Can't connect except as root

drew wymore drew.wymore at gmail.com
Thu May 17 18:01:36 UTC 2007


On 5/17/07, Richard C. Steffens <rsteff at comcast.net> wrote:
>
> drew wymore wrote:
>
> > It sounds like the password is being truncated to 8 characters maybe?
> Try
> > just using an 8 character password and see what happens.
>
> I tried a 8 character password, but still can't connect.
>
> ------------------------------------------------------------------------
> > mysql -u bookorama -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'bookorama'@'localhost'
> (using password: YES)
> ------------------------------------------------------------------------
>
>
> Paul Mullen wrote:
>
> > MySQL creates a hash of the password, similar to what you see in your
> > system's /etc/passwd (or /etc/shadow) file. While the hash is almost
> > certainly greater than 8 bytes long, it's possible the MySQL GUI only
> > shows eight asterisks as a matter of policy (displaying the hash
> > itself would probably just confuse the app's average user).
>
> I suspect you're right about what the GUI displays. I have a 7 character
> password for the mysql root user, and the GUI still shows 8.
>
> Looking further with MySQL Administrator, I discover that the resource
> limits seem to default to zero. There are three resources with a number
> next to each. They are:
>
> ------------------------------------------------------------------------
> max_questions   [0   ] Number of queries the user can execute within one
> hour.
>
> max_updates     [0   ] Number of updates the user can execute within one
> hour.
>
> max_connections [0   ] Number of connections to the server the user can
> open in an hour.
> ------------------------------------------------------------------------
>
> If the number of connections is zero, then that explains why I can't
> connect. When I try to change that number I get the error message:
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> Well, there was an error message the first time I tried it, but now it
> (MySQL Administrator) will accept changes. The error message said
> something to the effect that the changes couldn't be made, and reported
> a MySQL error number of 0 (I think).
>
> It didn't make any difference as to whether I could connect or not,
> though.
>
> Also, I notice that the same lack of resources is shown for root.
> However that does not prevent me from connecting as (MySQL) root.


Connect as root and execute this ..

mysql>use mysql;
mysql>select host from user where user = 'bookorama';

it should return the user you created along with whatever host was created
by MySQL Admin

Post that here, and also where you're trying to connect from (are you
actually connecting from localhost?) I've seen MySQL get weird and sometimes
it wants 127.0.0.1 instead of localhost or it wants the local machine name
instead of localhost when I've used some apps on it.



More information about the PLUG mailing list