MySQL problem >> missing mysql.sock


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users MySQL problem >> missing mysql.sock
# 1  
Old 08-15-2002
MySQL problem >> missing mysql.sock

MySQL on my server is down....

I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock

Any suggestions?

Here's what I can't do:
can't be root
don't have physical access (do stuff via SSH)
reinstall MySQL (need to keep the current MySQL databases)

I would also like if someone could post their mysql.sock file, I think that manually creating one will work. Also, I don't want to do touch mysql.sock to create the file because I think that wouldn't work.
# 2  
Old 08-15-2002
run ./configure --help to get to see where you can set
the sock file for mysql.

For recent versions of PHP, you can use "localhost:/path/to/mysql.sock"
in your mysql_connect call to tell it where to find the socket.
# 3  
Old 08-16-2002
Nobody can post you a mysql.sock file, it's a Unix domain Socket file which you _can't_ replicate.

Where is MySQL installed, have you tried running safe_mysqld?

Try executing "safe_mysqld &" from the directory that MySQL is installed in to execute MySQL.
# 4  
Old 08-17-2002
I have tried it. I start it and then I get bunch of errors that say like Access denied....
# 5  
Old 08-19-2002
MySQL

this is a little bold to try out,

shutdown mysql server

manually remove the mysql.sock file in /var/lib/mysql or whatever directory.

try restart the server.

please revert back if that works
# 6  
Old 09-27-2002
You have to start your mysqld.

If your mysqld is not running you will get a
missing mysql.sock file error.

Maybe your user name to login to mysql in not correct. MySql has a default user name. Unix
and MySql have nothing to do with each others
user names.

Without proper user name login, I get this:

-------------------------------------
# bin/safe_mysqld --log &
1168
# chown: unknown user id mysql
Starting mysqld daemon with databases from /usr/local/mysql/mysql-3.23.52/data
020926 22:24:22 mysqld ended


# bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
---------------------------------------------

Try something like:

shell> bin/safe_mysqld -u user_name &

Where user_name is your MySql login name.

To see if mysqld is running type:

Shell> bin/mysqladmin version

You should see something like:

Running threads: 1
# 7  
Old 09-27-2002
mysql.sock is required for mysqld processes to operate. For example, if your mysql.sock file exists in /tmp and you decide to delete all the 'temp files' you will have a problem with mysql Smilie

You should make sure you know which directory that the mysql.sock file is created and make sure the mysqld processes have permission to write to that directory... and make sure that prior mysql.sock files are either deleted or have correct permissions so when another process is started it can overwrite this file.

For example:

Quote:
server# cd /tmp
server# ll *sock*
srwxrwxrwx 1 root root 0 Aug 10 00:14 mysql.sock=
server#
Notice that the mysql.sock file is in /tmp and the permission are root.root because mysql is running as root.root. If you are not running mysql as root, then you could have problems writing if another mysql.sock file exists, etc.

My advise is to find out where your system is writing this file, shutdown mysql, delete all the old mysql.sock files, check permissions and restart.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Missing the MySQL extension which is required by WordPress.

hi i started in the apache userdirectory and virtual host now iwant installtion wordpress in home one of the useres But this error is Your PHP installation appears to be missing the MySQL extension which is required by WordPress. And the configuration files and other items I was enter... (0 Replies)
Discussion started by: mnnn
0 Replies

2. UNIX for Dummies Questions & Answers

MySQL Database Missing on UNIX server. Possible to recover?

My dedicated server is VERY old (running Apache/1.3.37 (Unix) PHP/4.4.4 FrontPage/5.0.2.2510). We have a script that runs and manages our customer database. Early in the morning last Friday, it was working fine and processed data as usual. Later in the day, we got this error: Cannot... (2 Replies)
Discussion started by: SurfMe69
2 Replies

3. Homework & Coursework Questions

Mysql missing mysqld.sock (Linux)

I am trying to start a server for a class I am in but... mysql won't start with this error ( ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ) ---------- Post updated at 03:51 PM ---------- Previous update was at 03:50 PM ---------- ... (2 Replies)
Discussion started by: Slayer939
2 Replies

4. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

5. UNIX and Linux Applications

MySQL missing my.cnf

Hi, SLES11 : I've installed the following MySQL Package: MySQL-client-community-5.1.54-1.sles11.x86_64 MySQL-devel-community-5.1.54-1.sles11.x86_64 MySQL-server-community-5.1.54-1.sles11.x86_64 MySQL-shared-community-5.1.54-1.sles11.x86_64Problem: I don't see any my.cnf file (find / -name... (1 Reply)
Discussion started by: hiddenshadow
1 Replies

6. UNIX for Dummies Questions & Answers

[SOLVED] mysql.sock is missing..

mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix... since without that file .. project is not opening.. reply me as soon as possible ... (19 Replies)
Discussion started by: senkerth
19 Replies

7. Red Hat

Missing dependencies updating unixODBC / MySQL Connector

I have installed mysql-connector-odbc-5.1.5-0.i386.rpm and libtools on my Fedora12 system. Updating with yum says that there is nothing to update. Updating with rpm -Uvh mysql-connector-odbc-5.1.7-0.i386.rpm fails with the same missing dependencies as for the 64-bit version. Should I force... (4 Replies)
Discussion started by: Bengbers
4 Replies

8. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies
Login or Register to Ask a Question