* [gentoo-user] ... Can't connect to local MySQL server ...
@ 2006-02-05 0:05 Fredrik Lundgren
2006-02-05 0:22 ` A. Khattri
0 siblings, 1 reply; 7+ messages in thread
From: Fredrik Lundgren @ 2006-02-05 0:05 UTC (permalink / raw
To: gentoo-user
All Gentoos,
In the rebuild of my crashed Gentoo box
I recently emerged dev-db/mysql 5.0.18-r30
and defined the password for root.
When I try to visit with
$ mysql -u root -p
password. *******
I get
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'var/run/mysqld.sock' (2)
Evidently my configuration is wrong
Has anyone a tip or two ?
and how do I get mysql to start at boot?
Best wishes Fredrik
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] ... Can't connect to local MySQL server ...
2006-02-05 0:05 [gentoo-user] ... Can't connect to local MySQL server Fredrik Lundgren
@ 2006-02-05 0:22 ` A. Khattri
2006-02-05 0:40 ` John Jolet
0 siblings, 1 reply; 7+ messages in thread
From: A. Khattri @ 2006-02-05 0:22 UTC (permalink / raw
To: gentoo-user
On Sun, 5 Feb 2006, Fredrik Lundgren wrote:
> When I try to visit with
> $ mysql -u root -p
> password. *******
>
> I get
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> 'var/run/mysqld.sock' (2)
>
> Evidently my configuration is wrong
>
> Has anyone a tip or two ?
Maybe start mysqld?
/etc/init.d/mysql start
> and how do I get mysql to start at boot?
Maybe use rc-update?
rc-update add mysql default
(Yes, its in the handbook)
--
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] ... Can't connect to local MySQL server ...
2006-02-05 0:22 ` A. Khattri
@ 2006-02-05 0:40 ` John Jolet
2006-02-05 1:37 ` Fredrik Lundgren
0 siblings, 1 reply; 7+ messages in thread
From: John Jolet @ 2006-02-05 0:40 UTC (permalink / raw
To: gentoo-user
On Feb 4, 2006, at 6:22 PM, A. Khattri wrote:
> On Sun, 5 Feb 2006, Fredrik Lundgren wrote:
>
>> When I try to visit with
>> $ mysql -u root -p
>> password. *******
>>
>> I get
>> ERROR 2002 (HY000): Can't connect to local MySQL server through
>> socket
>> 'var/run/mysqld.sock' (2)
>>
>> Evidently my configuration is wrong
>>
>> Has anyone a tip or two ?
>
> Maybe start mysqld?
>
> /etc/init.d/mysql start
>
and make sure it's still running. and make sure there's an entry for
the mysql client in the my.cnf pointing to the proper socket.
>> and how do I get mysql to start at boot?
>
> Maybe use rc-update?
>
> rc-update add mysql default
>
>
> (Yes, its in the handbook)
>
> --
>
> --
> gentoo-user@gentoo.org mailing list
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] ... Can't connect to local MySQL server ...
2006-02-05 0:40 ` John Jolet
@ 2006-02-05 1:37 ` Fredrik Lundgren
2006-02-05 2:13 ` John Jolet
0 siblings, 1 reply; 7+ messages in thread
From: Fredrik Lundgren @ 2006-02-05 1:37 UTC (permalink / raw
To: gentoo-user
Thanks for the suggestions!
The problem is that
# /etc/init.d/mysql start
* ...
* Starting mysql (/etc/mysql/my.cnf)
* MySQL NOT started (0) [!!]
In my.cnf
....
....
[client]
# password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
...
...
[mysqld]
...
...
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
....
...
So it appears that /var/run/mysqld/mysqld.sock somehow is corrupted
How should that be fixed?
Fredrik
----- Original Message -----
From: "John Jolet" <john@jolet.net>
To: <gentoo-user@lists.gentoo.org>
Sent: Sunday, February 05, 2006 1:40 AM
Subject: Re: [gentoo-user] ... Can't connect to local MySQL server ...
>
> On Feb 4, 2006, at 6:22 PM, A. Khattri wrote:
>
>> On Sun, 5 Feb 2006, Fredrik Lundgren wrote:
>>
>>> When I try to visit with
>>> $ mysql -u root -p
>>> password. *******
>>>
>>> I get
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through
>>> socket
>>> 'var/run/mysqld.sock' (2)
>>>
>>> Evidently my configuration is wrong
>>>
>>> Has anyone a tip or two ?
>>
>> Maybe start mysqld?
>>
>> /etc/init.d/mysql start
>>
> and make sure it's still running. and make sure there's an entry for
> the mysql client in the my.cnf pointing to the proper socket.
>>> and how do I get mysql to start at boot?
>>
>> Maybe use rc-update?
>>
>> rc-update add mysql default
>>
>>
>> (Yes, its in the handbook)
>>
>> --
>>
>> --
>> gentoo-user@gentoo.org mailing list
>>
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] ... Can't connect to local MySQL server ...
2006-02-05 1:37 ` Fredrik Lundgren
@ 2006-02-05 2:13 ` John Jolet
2006-02-05 3:22 ` [gentoo-user]Solved " Fredrik Lundgren
0 siblings, 1 reply; 7+ messages in thread
From: John Jolet @ 2006-02-05 2:13 UTC (permalink / raw
To: gentoo-user
On Feb 4, 2006, at 7:37 PM, Fredrik Lundgren wrote:
> Thanks for the suggestions!
>
> The problem is that
>
> # /etc/init.d/mysql start
> * ...
> * Starting mysql (/etc/mysql/my.cnf)
> * MySQL NOT started (0) [!!]
>
> In my.cnf
>
> ....
> ....
> [client]
> # password = your_password
> port = 3306
> socket = /var/run/mysqld/mysqld.sock
> ...
> ...
>
> [mysqld]
> ...
> ...
> user = mysql
> port = 3306
> socket = /var/run/mysqld/mysqld.sock
> ....
> ...
>
> So it appears that /var/run/mysqld/mysqld.sock somehow is corrupted
> How should that be fixed?
>
not necessarily. make sure mysql is not running. check for the
existence of /var/run/mysqld/mysqld.sock...if it exists, delete it.
it shouldn't exist with mysql not running.
> Fredrik
>
> ----- Original Message ----- From: "John Jolet" <john@jolet.net>
> To: <gentoo-user@lists.gentoo.org>
> Sent: Sunday, February 05, 2006 1:40 AM
> Subject: Re: [gentoo-user] ... Can't connect to local MySQL server ...
>
>
>>
>> On Feb 4, 2006, at 6:22 PM, A. Khattri wrote:
>>
>>> On Sun, 5 Feb 2006, Fredrik Lundgren wrote:
>>>
>>>> When I try to visit with
>>>> $ mysql -u root -p
>>>> password. *******
>>>>
>>>> I get
>>>> ERROR 2002 (HY000): Can't connect to local MySQL server through
>>>> socket
>>>> 'var/run/mysqld.sock' (2)
>>>>
>>>> Evidently my configuration is wrong
>>>>
>>>> Has anyone a tip or two ?
>>>
>>> Maybe start mysqld?
>>>
>>> /etc/init.d/mysql start
>>>
>> and make sure it's still running. and make sure there's an entry for
>> the mysql client in the my.cnf pointing to the proper socket.
>>>> and how do I get mysql to start at boot?
>>>
>>> Maybe use rc-update?
>>>
>>> rc-update add mysql default
>>>
>>>
>>> (Yes, its in the handbook)
>>>
>>> --
>>>
>>> --
>>> gentoo-user@gentoo.org mailing list
>>>
>>
>> --
>> gentoo-user@gentoo.org mailing list
>>
>>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user]Solved ... Can't connect to local MySQL server ...
2006-02-05 2:13 ` John Jolet
@ 2006-02-05 3:22 ` Fredrik Lundgren
2006-02-05 13:46 ` [gentoo-user] Re: Solved " Harm Geerts
0 siblings, 1 reply; 7+ messages in thread
From: Fredrik Lundgren @ 2006-02-05 3:22 UTC (permalink / raw
To: gentoo-user
Dear list,
It appears as if mysql 5.0.18-r30
sets up:
datadir = /var/lib/mysql-500
while my.cnf was from earlier version (I thought I deleted it with
etc-update) indicating:
datadir =/var/lib/mysql
After correction in my.cnf to:
datadir =/var/lib/mysql-500
everything works OK!
Fredrik
----- Original Message -----
From: "John Jolet" <john@jolet.net>
To: <gentoo-user@lists.gentoo.org>
Sent: Sunday, February 05, 2006 3:13 AM
Subject: Re: [gentoo-user] ... Can't connect to local MySQL server ...
>
> On Feb 4, 2006, at 7:37 PM, Fredrik Lundgren wrote:
>
>> Thanks for the suggestions!
>>
>> The problem is that
>>
>> # /etc/init.d/mysql start
>> * ...
>> * Starting mysql (/etc/mysql/my.cnf)
>> * MySQL NOT started (0) [!!]
>>
>> In my.cnf
>>
>> ....
>> ....
>> [client]
>> # password = your_password
>> port = 3306
>> socket = /var/run/mysqld/mysqld.sock
>> ...
>> ...
>>
>> [mysqld]
>> ...
>> ...
>> user = mysql
>> port = 3306
>> socket = /var/run/mysqld/mysqld.sock
>> ....
>> ...
>>
>> So it appears that /var/run/mysqld/mysqld.sock somehow is corrupted
>> How should that be fixed?
>>
> not necessarily. make sure mysql is not running. check for the
> existence of /var/run/mysqld/mysqld.sock...if it exists, delete it.
> it shouldn't exist with mysql not running.
>
>> Fredrik
>>
>> ----- Original Message ----- From: "John Jolet" <john@jolet.net>
>> To: <gentoo-user@lists.gentoo.org>
>> Sent: Sunday, February 05, 2006 1:40 AM
>> Subject: Re: [gentoo-user] ... Can't connect to local MySQL server
>> ...
>>
>>
>>>
>>> On Feb 4, 2006, at 6:22 PM, A. Khattri wrote:
>>>
>>>> On Sun, 5 Feb 2006, Fredrik Lundgren wrote:
>>>>
>>>>> When I try to visit with
>>>>> $ mysql -u root -p
>>>>> password. *******
>>>>>
>>>>> I get
>>>>> ERROR 2002 (HY000): Can't connect to local MySQL server through
>>>>> socket
>>>>> 'var/run/mysqld.sock' (2)
>>>>>
>>>>> Evidently my configuration is wrong
>>>>>
>>>>> Has anyone a tip or two ?
>>>>
>>>> Maybe start mysqld?
>>>>
>>>> /etc/init.d/mysql start
>>>>
>>> and make sure it's still running. and make sure there's an entry
>>> for
>>> the mysql client in the my.cnf pointing to the proper socket.
>>>>> and how do I get mysql to start at boot?
>>>>
>>>> Maybe use rc-update?
>>>>
>>>> rc-update add mysql default
>>>>
>>>>
>>>> (Yes, its in the handbook)
>>>>
>>>> --
>>>>
>>>> --
>>>> gentoo-user@gentoo.org mailing list
>>>>
>>>
>>> --
>>> gentoo-user@gentoo.org mailing list
>>>
>>>
>>
>>
>> --
>> gentoo-user@gentoo.org mailing list
>>
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: Solved ... Can't connect to local MySQL server ...
2006-02-05 3:22 ` [gentoo-user]Solved " Fredrik Lundgren
@ 2006-02-05 13:46 ` Harm Geerts
0 siblings, 0 replies; 7+ messages in thread
From: Harm Geerts @ 2006-02-05 13:46 UTC (permalink / raw
To: gentoo-user
On Sunday 05 February 2006 04:22, Fredrik Lundgren wrote:
> Dear list,
>
> It appears as if mysql 5.0.18-r30
> sets up:
> datadir = /var/lib/mysql-500
>
> while my.cnf was from earlier version (I thought I deleted it with
> etc-update) indicating:
> datadir =/var/lib/mysql
>
> After correction in my.cnf to:
> datadir =/var/lib/mysql-500
>
> everything works OK!
You might want to have a look at the slotted mysql upgrade guide to make sure
you've updated all the settings.
http://www.gentoo.org/doc/en/mysql-upgrade-slotted.xml
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-05 13:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-05 0:05 [gentoo-user] ... Can't connect to local MySQL server Fredrik Lundgren
2006-02-05 0:22 ` A. Khattri
2006-02-05 0:40 ` John Jolet
2006-02-05 1:37 ` Fredrik Lundgren
2006-02-05 2:13 ` John Jolet
2006-02-05 3:22 ` [gentoo-user]Solved " Fredrik Lundgren
2006-02-05 13:46 ` [gentoo-user] Re: Solved " Harm Geerts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox