The mysql.sock location '/var/lib/mysql/mysql.sock' attempted to be used by your
connecting client may be wrong.

linux$ ls -la /var/lib/mysql/mysql.sock

Does the file exist?

You say this is the sock file created by mysqld:
>
> srwxrwxrwx  mysql mysql system_u:object_r:mysqld_var_run_t mysql.sock

So your client would need to connect like so:

linux$ mysql --socket="system_u:object_r:mysqld_var_run_t mysql.sock" 
--user=user -p

What OS are you running MySQL on?

-RG


Ali Nebi wrote:
> On Tue, 2007-11-06 at 09:32 -0600, [EMAIL PROTECTED] wrote:
>> i believe you need to have root create the file /var/lib/mysql/mysql.sock
>> and then make it readable and writable by the user that owns mysql.
>>
>> You can make that same file owner by the user that runs mysql.
>>
>>
>>
>>
>> -----Original Message-----
>>> From: Ali Nebi <[EMAIL PROTECTED]>
>>> Sent: Nov 6, 2007 9:24 AM
>>> To: mysql@lists.mysql.com
>>> Subject: Please help to solve a serios problem
>>>
>>> Hi, i need of help for a serios problem.
>>>
>>> We have installed mysql 5 and we are using InnoDB engine. OS is CentOS
>>> 5, x86. 
>>>
>>> Our problem is this. 
>>> We get this message in the log:
>>>
>>>
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>>> '/var/lib/mysql/mysql.sock' (111)
>>> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
>>> '/var/lib/mysql/mysql.sock' (111)
>>>
>>> The problem is that mysql make recovering the database, we are
>>> restarting whole server and it crash again. It continue to crash. We
>>> tried to recover manually database, but it continue to crash. What we
>>> can do to solve this problem?
>>>
>>> We need to solve this problem urgently. 
>>>
>>> Thanks in advanced!
>>>
>>> Regards, Ali Nebi!
>>>
>>>
>>> -- 
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>>>
> 
> This socket file is created automatically when i run mysql by this
> way: /etc/init.d/mysql start.
> The file has these permissions set. I think this is ok, problem is
> something different i think, but i don't know where.
> 
> srwxrwxrwx  mysql mysql system_u:object_r:mysqld_var_run_t mysql.sock
> 
> 
> 
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to