----- Original Message -----
From: ian douglas <id@stripped> ian douglas的问题跟你一样
To: Cecep Rosuludin <cecepr@stripped>
Subject: Re: Can't connect to local MySQL server through socket'/var/lib/mysql/mysql.sock'
Date: Mon, 01 Nov 2004 17:48:27 -0800
>
> > [root@server6 root]# ls -l /var/lib/mysql
> > total 20564
> > -rw-rw---- 1 mysql mysql 25088 Nov 1 14:10 ib_arch_log_0000000000
> > -rw-rw---- 1 mysql mysql 10485760 Nov 2 07:39 ibdata1
> > -rw-rw---- 1 mysql mysql 5242880 Nov 2 07:39 ib_logfile0
> > -rw-rw---- 1 mysql mysql 5242880 Nov 1 14:10 ib_logfile1
> > drwx--x--x 2 mysql mysql 4096 Feb 23 2004 mysql/
> > -rw-rw---- 1 mysql root 7509 Nov 2 07:39 server6.cma-cgm.com.err
> > drwxr-xr-x 2 mysql mysql 4096 Feb 23 2004 test/
>
> Therein lies your problem: you can't connect to
> /var/lib/mysql/mysql.sock if it doesn't exist )
> 这里贴出你的问题:如果它不存在的话,你无法连接到/var/lib/mysql/mysql.sock
> RedHat was notorious for putting mysql.sock in /tmp/ ... perhaps check
> that path to see if the socket file exists there, and do one of the
> following:
> redhat一般把mysql.sock放在了/tmp/ ... 下,可能查找那个路径看看socket文件是否存在,然后按照下面来做:
> (a) symlink it to /var/lib/mysql:
> (a)把它到/var/lib/mysql:
> ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
>
> -OR-
>
> (b) modify your MySQL configuration (check for /etc/my.cnf):
> 更改你的MySQL设置
> under the "[mysqld]" heading:
>
> socket=/var/lib/mysql/mysql.sock
>
> ... set that path and filename to wherever your mysql.sock file lives.
设置路径和文件名到你的mysql.sock文件所在地
>
> You could try using:
> 你可以尝试使用:
> locate mysql.sock
>
> ... to find the file for you as well.
> 到你发现文件的位置
> -id
>
>