MySQL and udev

Robert L Cochran cochranb at speakeasy.net
Mon Feb 28 04:58:49 UTC 2005


Robert L Cochran wrote:

>
>> mysqladmin: connect to server at 'T8.linux' failed
>> error: '#HY000Host 'localhost.localdomain' is not allowed to connect to
>> this MySQL server'
>>
>>
>
> This gives me the impression that you had already previously set a 
> root password for this server, and are attempting to change it. If 
> this is right, then you need to connect to the MySQL server using the 
> hostname you originally specified for the root user. E.g. user root 
> needs to connect with some other hostname and it can't be an aliased 
> hostname. It has to be the hostname that was set for the machine at 
> networking time. 'T8.linux' is not the hostname. It is just an alias 
> for 'localhost.localdomain' and it won't be sent to the MySQL server.
>
> So I think you either must set your machine to the hostname MySQL is 
> expecting for the root user ('T8.linux'?) or you must reset the MySQL 
> root password.
>
> There is a way to reset the root password, documented on the MySQL 
> website, or in Paul DuBois' excellent book MySQL (Second Edition). You 
> might want to read DuBois' suggestions for setting the root password, 
> and at the same time change your host's configuration so that it is 
> assigned a consistent hostname.
>
> MySQL is big and complex, and there are a lot of books on the market 
> for it. I very highly reccomend you buy and use DuBois' book. I can't 
> live without it myself. No one else writes about MySQL better.
>
> Bob Cochran
>
Or, if you are setting the root password for the first time, just check 
to make sure you know what your hostname truly is, perhaps by issuing 
'env' and checking the HOSTNAME output:

[rlc at bobcp4 itemlist]$ env
...
HOSTNAME=bobcp4.lingpgmr.com


And then use that as the hostname you supply to mysqladmin:

-h bobcp4.lingpgmr.com

Bob




More information about the fedora-test-list mailing list