----- Original Message -----
From: "Russell E Glaue" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>
Sent: Tuesday, November 06, 2007 8:55 PM
Subject: Re: Please help to solve a serios problem


>
> 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
>
>
> >
> > 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

Thanks for the reply.
> Does the file exist?
Yes, i see that the file exist.
> You say this is the sock file created by mysqld:
when mysqld daemon is stopped the mysql.sock file not exist, when we run
/etc/init.d/mysqd (this is mysql.server), it start mysql_safe and create
mysql.sock under /var/lib/mysql/.

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

We don't need to use socket option because in /etc/my.cnf we have set where
is mysql.sock file. By this way when we start mysql server, mysql client
already know where is mysql socket. I suppose this is correct, if not please
correct me.

We are using CentOS 5, 64 bits version.

Also this:
system_u:object_r:mysqld_var_run_t.
It is not need to be set in sock="", because these are SELinux permissions,
this is different.


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

Reply via email to