View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 07:14 AM
Bill Karwin
 
Posts: n/a
Default Re: problem with mysql.sock

"Ben" <qsvqs@qsdcsqd> wrote in message
news92dnSOBe_LXbDLeRVnyvw@scarlet.biz...
> I installed mysql 5.0 on redhat 9.0 from source (tar).
> The whole procedure occured properly, i could do ./mysqld_safe.
> But when i want to start the client: mysql, i get :error 2002: cannot
> connect to mysql server through 'tmp/mysql.sock'.


Do you mean '/tmp/mysql.sock'? It probably won't work if it's a relative
path.

> I also created 'my.cnp into /etc


Do you mean 'my.cnf'?

> I recompiled it again (make, make install) but still no file 'mysql.sock'
> anywhere.


Can you confirm that mysqld is running? That is, can you observe the mysqld
process in a 'ps' listing? I have frequently found it troublesome to get
mysqld to start up on Linux. Sometimes when I run mysqld_safe on Linux it
returns to a prompt silently, but fails to start the daemon and logs an
error message. Be sure to check the error file <hostname>.err, which is
typically created under the MySQL data directory.

See http://dev.mysql.com/doc/refman/5.0/...to-server.html
for more troubleshooting tips.

Another possibility is that the mysql client you are running from the shell
is left over from a previous version of MySQL installed on your system, and
it thinks the socket file is in /tmp/mysql.sock, while the MySQL 5.0 daemon
you just compiled and started (assuming it did start) thinks the socket file
is somewhere different. Sometimes it's configured to be created under
MySQL's data directory. Sometimes under /var somewhere. This should have
been set at configure time before you compiled. See
http://dev.mysql.com/doc/refman/5.0/...e-options.html.

Also read
http://dev.mysql.com/doc/refman/5.0/...ysql-sock.html

Regards,
Bill K.



Reply With Quote