[Sussex] Setting up MySQL under FC6

Matthew Macdonald-Wallace matthew at truthisfreedom.org.uk
Tue May 29 13:33:35 UTC 2007


On Tue, 29 May 2007 14:09:17 +0100, "Brendan Whelan" <b_whelan at mistral.co.uk> wrote:
> Hello,
> 
> I have a new installation of Fedora Core 6 and, as ever, there are a few
> changes from earlier versions to the likes of MySQL. 
> I installed FC6 and then installed MySQL and configured the network. I
> also set the MySQL password. 
> 
> service mysqld start          works fine
> 
> But when I try to connect with
> mysql -u root 
> or
> mysql -u root -pmypassword
> 
> I get a failure message 1045 Access denied for user
> 
> I have tried re-installing the MySQL and searched the Internet there are
> some suggestions that it could be a problem with /etc/hosts.
> My hosts file has one working line 
> ::1 my_machine_name localhost.localdomain localhost 127.0.0.1
> 
> I have tried starting mysql with skip-grant-tables but I don't seem to
> have the precise syntax.
> 
> Any suggestions?
> 
> Thanks,  Brendan

edit the line in /etc/hosts to show:

127.0.0.1 my_machine_name localhost.localdomain localhost
::1 my_machine_name localhost.localdomain localhost

Basically, your machine is quite possibly being thrown by IPv6 (mine does all the time!) so until you are using an IPv6 network, I suggest that you make sure that any ip addresses are IPv4.

Also, try:

mysql -u root -p

and then type your password when prompted.

HTH,

Matt.





More information about the Sussex mailing list