First of all, are you sure MySQL is running? The mysql.sock file only
appears when the server is running. Run the following command on the command
line to make sure:

ps awx | grep mysqld

You should see one line with "safe_mysqld" in it, and at least a few lines
with "mysqld" in them. If not, you need to start the server. Once the server
is running, if you have superuser privileges on your system, you can run:

updatedb

This will take a few seconds and re-index all the files on your system, so
you can run:

locate mysql.sock

to find out where the server is creating the socket. This command should
give you the path to the mysql.sock file. Once you have that, look in your
my.cnf file for lines like:

[client]
port        = 3306
socket    = /path/to/mysql.sock

[mysqld]
port        = 3306
socket    = /path/to/mysql.sock

The "socket" variable is where MySQL *thinks* your mysql.sock should be --
not necessarily where it is. Change these lines to match the path returned
by the "locate" command and things should work. If you don't have superuser
access and you can't run "updatedb", the most likely places for mysql.sock
are your installation directory (where the data files are stored), and:

/var/tmp/mysql.sock
/var/lib/mysql/mysql.sock

At least on RedHat -- I'm not sure about SUSE, but it's worth a look. Check
these places and see if it exists. If you find it, update your my.cnf file
with the correct path.

Good luck!

--jeff

----- Original Message -----
From: "Intrex" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 02, 2002 5:26 PM
Subject: mysql.sock


> Ok here it is.  I get that annoying error.  ERROR 2002: Can't connect to
> local MySQL server through socket /var/lib/mysql/mysql.sock (111)
>
> Ok now I DO NOT have a mysql.sock anyplace on my system.  I have
downloaded
> the "stable" .tar.gz  and unzipped it and still do not have a mysql.sock
>
> Somepleaze tell me how to create it, or what to pu in it.  Please DO NOT
> tell me about changing paths and stuff, I have done that till i am blue in
> the face.
>
> Or please e-mail me a copy of a mysql.sock.
>
> I am running SuSE 7.3 and mysql version Ver 11.15 Distrib 3.23.41
>
> I also have the current 3.23.49a.   any help would be appreciated.
>
> Mark
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to