The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
MySQL article - Sun and MySQL: How It Stacks Up for Developers iBot UNIX and Linux RSS News 0 02-28-2008 08:20 PM
MySQL conflicts with mysql-3.23.58-16.RHEL3.1 johnveslin Linux 2 07-17-2007 03:49 AM
Mysql problem 12yearold Shell Programming and Scripting 1 07-12-2006 02:05 AM
mysql would not start: missing mysql.sock xnightcrawl UNIX for Advanced & Expert Users 2 05-26-2006 07:06 AM
Problem with PHP and MySQL Danny_10 Shell Programming and Scripting 11 04-29-2004 07:55 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-15-2002
Registered User
 

Join Date: Jun 2002
Posts: 15
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.
Forum Sponsor
  #2  
Old 08-15-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
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-15-2002
Registered User
 

Join Date: Aug 2002
Posts: 3
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
Registered User
 

Join Date: Jun 2002
Posts: 15
I have tried it. I start it and then I get bunch of errors that say like Access denied....
  #5  
Old 08-18-2002
asifraj's Avatar
Registered User
 

Join Date: Aug 2002
Location: India
Posts: 48
Thumbs up

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-26-2002
photon's Avatar
Registered User
 
Join Date: Jul 2002
Posts: 148
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-26-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
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

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.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0