Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql would not start: missing '/tmp/mysql.sock'

Status
Not open for further replies.

ponetguy2

MIS
Aug 28, 2002
442
US
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:

# mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

According to pkginfo -l, the installation was successful:

# uname -a
SunOS <hostname> 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250
# pkginfo -l mysql
PKGINST: mysql
NAME: MySQL Community Edition - Standard (GPL)
CATEGORY: application
ARCH: sun4u
VERSION: 5.0.21
BASEDIR: /opt/mysql
VENDOR: MySQL AB
PSTAMP: MySQL AB Build Engineers
INSTDATE: May 25 2006 10:40
EMAIL: build@mysql.com
STATUS: completely installed
FILES: 1668 installed pathnames
54 directories
99 executables
163084 blocks used (approx)

I also did a find on mysql.sock, and I came up with nothing. Any ideas? I would really appreciate any help or advise :)
 
Several questions for you.

1. Is MySQL even running?
2. What does your my.cnf look like? Make sure the path to the mysql.sock is correct.

M. Brooks
 
mysql is not running:

# ps -ef | grep mysqld
root 1560 750 0 14:17:56 pts/3 0:00 grep mysqld

I can't find my.cnf to answer your second question. However, I was snooping around mysql dirs and files and found this dir and I did a grep on some of the .cnf files

# cd /opt/mysql/mysql/support-files;ls

MySQL-shared-compat.spec my-large.cnf mysql-log-rotate mysql.server.old.852
magic my-medium.cnf mysql.server mysql.server.old.9085
my-huge.cnf my-small.cnf mysql.server.in mysql.spec
my-innodb-heavy-4G.cnf mysql-5.0.21.spec mysql.server.old.6796 ndb-config-2-node.ini

# grep mysql.sock my-large.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-medium.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-small.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-huge.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-innodb-heavy-4G.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock

It was running previously. I'm not sure if my mod_perl install broke it. Previously, mysql starts with no problem, but after I installed mod_perl, it would'nt start anymore. I'm not sure if it has anything to do with it :(

# find / -name my.cnf
#

Thank you again for your help mbrooks.
 
i'm starting mysql manually. i usually cd into /etc/init.d and do a mysql start or i cd into /opt/mysql/mysql/bin.
 
There should have been a start-up script that came with your MySQL install. Use it to start MySQL.
Upon failure all errors will be written into your db directory.

M. Brooks
 
I looked in /etc/rc2.d and /etc/rc3.d for the startup script, but I can't find it.
 
Did you run mysql_install_db?

There is also a config file for mysql that is in /etc or can be moved to the owner's root.
 
I finally started mysql. I had to cd into /opt/mysql/mysql/support-files and start mysql.server. this was a little different before. I guess when I ran mysql_install_db as kHz instructed, it made some changes. Thank you kHz for pointing me to the right direction again.

I still can't find the mysql config file. I looked in my /etc directory and I can't find it. I did a grep on conf and there is no config file which is used for mysql.
 
Below are the conf files. Depending on how on how large a server you plan to run, you modify the correct file to meet your requirements and rename it to my.cnf.

# grep mysql.sock my-large.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-medium.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-small.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-huge.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock
# grep mysql.sock my-innodb-heavy-4G.cnf
socket = /tmp/mysql.sock
socket = /tmp/mysql.sock

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top