how do I get the socket and then avoid the "Can"t connect to localMySQL server through socket "...
how do I get the socket and then avoid the "Can"t connect to localMySQL server through socket "...
am 11.10.2006 18:40:01 von Christian
Hi,
Trying to connect to the MySQL server I get the classic error message
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.
But how do I get a new socket?
Thanks,
Chris
Re: how do I get the socket and then avoid the "Can"t connect tolocal MySQL server through socket ".
am 11.10.2006 20:07:49 von HG
Christian wrote:
> Hi,
>
>
> Trying to connect to the MySQL server I get the classic error message
>
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (2)
>
> I have tested and know that demon is running and then checket and found
> the /var/lib/mysql/mysql.sock file missing.
>
> But how do I get a new socket?
>
>
> Thanks,
>
> Chris
Is the server running ?
Re: how do I get the socket and then avoid the "Can"t connect tolocal MySQL server through socket "
am 11.10.2006 20:15:29 von Bill Karwin
Christian wrote:
> I have tested and know that demon is running and then checket and found
> the /var/lib/mysql/mysql.sock file missing.
>
> But how do I get a new socket?
The socket file is created when the MySQL Server starts. But the MySQL
Server may have a different idea of where that socket file is supposed
to be created. Check your MySQL config file (my.ini or my.cnf) for the
"socket" option.
See also
http://dev.mysql.com/doc/refman/5.0/en/problems-with-mysql-s ock.html for
information on specifying the socket file location.
Regards,
Bill K.
Re: how do I get the socket and then avoid the "Can"t connect tolocal MySQL server through socket ".
am 12.10.2006 09:55:32 von Christian
hg wrote:
> Christian wrote:
>> Hi,
>>
>>
>> Trying to connect to the MySQL server I get the classic error message
>>
>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>> '/var/lib/mysql/mysql.sock' (2)
>>
>> I have tested and know that demon is running and then checket and found
>> the /var/lib/mysql/mysql.sock file missing.
>>
>> But how do I get a new socket?
>>
>>
>> Thanks,
>>
>> Chris
> Is the server running ?
Yes, because
workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld
Re: how do I get the socket and then avoid the "Can"t connect to local MySQL server through socket "
am 13.10.2006 15:19:36 von Brian Mac
hi christian,
the output of your ps -
> workstation:/home/cmj # ps xa | grep mysqld
> 17811 pts/4 S+ 0:00 grep mysqld
simply means the grep happened to find itself in the ps output.
try running this instead:
ps xa | grep mysqld | grep -v grep
the -v option says to ignore the string that follows. if nothing comes
back you don't have any mysqld running and you'll have to restart it.
hope this helps,
brian
Christian wrote:
> hg wrote:
> > Christian wrote:
> >> Hi,
> >>
> >>
> >> Trying to connect to the MySQL server I get the classic error message
> >>
> >> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> >> '/var/lib/mysql/mysql.sock' (2)
> >>
> >> I have tested and know that demon is running and then checket and found
> >> the /var/lib/mysql/mysql.sock file missing.
> >>
> >> But how do I get a new socket?
> >>
> >>
> >> Thanks,
> >>
> >> Chris
> > Is the server running ?
>
> Yes, because
>
> workstation:/home/cmj # ps xa | grep mysqld
> 17811 pts/4 S+ 0:00 grep mysqld
Re: how do I get the socket and then avoid the "Can"t connect tolocal MySQL server through socket ".
am 13.10.2006 16:01:43 von HG
Christian wrote:
> hg wrote:
>> Christian wrote:
>>> Hi,
>>>
>>>
>>> Trying to connect to the MySQL server I get the classic error message
>>>
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>>> '/var/lib/mysql/mysql.sock' (2)
>>>
>>> I have tested and know that demon is running and then checket and found
>>> the /var/lib/mysql/mysql.sock file missing.
>>>
>>> But how do I get a new socket?
>>>
>>>
>>> Thanks,
>>>
>>> Chris
>> Is the server running ?
>
> Yes, because
>
> workstation:/home/cmj # ps xa | grep mysqld
> 17811 pts/4 S+ 0:00 grep mysqld
Brian is quite correct (I had not looked at your output carefully) - it
looks like your server is not running.
hg
Re: how do I get the socket and then avoid the "Can"t connect tolocal MySQL server through socket ".
am 14.10.2006 04:59:27 von Christian
Brian Mac wrote:
> hi christian,
>
> the output of your ps -
>
>> workstation:/home/cmj # ps xa | grep mysqld
>> 17811 pts/4 S+ 0:00 grep mysqld
>
> simply means the grep happened to find itself in the ps output.
>
> try running this instead:
>
> ps xa | grep mysqld | grep -v grep
>
> the -v option says to ignore the string that follows. if nothing comes
> back you don't have any mysqld running and you'll have to restart it.
>
> hope this helps,
> brian
Thanks brian, you were quite right, and now its working.