problem with MYSQL SERVER

adamp

Verified User
Joined
Jan 11, 2007
Messages
141
hello i have problem and i serach fix in all the forums
mysqld not running
and i get this error when i try to enter mysql mangment in da:
Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

and i can't sea the database
i try this:
http://help.directadmin.com/item.php?id=332

but this is not fix my problem

the log of /home/mysql/hostename.err:
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
110403 17:11:16 InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
file "1.hosname.com.err", 6551785 lines


i do:
162# ls -la /var/lib/mysql/mysql.sock
ls: /var/lib/mysql/mysql.sock: No such file or directory
162# ln -sf /var/lib/mysql/mysql.sock /tmp/mysql.sock
162# ln -sf /var/lib/mysql/mysql.sock /tmp/mysql.sock
162# ln -sf /var/lib/mysql/mysql.sock /tmp/mysql.sock
162# netstat -lnp | grep mysql
netstat: option requires an argument -- p
usage: netstat [-AaLnSW] [-f protocol_family | -p protocol]
[-M core] [-N system]
netstat -i | -I interface [-abdhnt] [-f address_family]
[-M core] [-N system]
netstat -w wait [-I interface] [-d] [-M core] [-N system]
netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]
netstat -i | -I interface -s [-f protocol_family | -p protocol]
[-M core] [-N system]
netstat -m [-M core] [-N system]
netstat -B [ -I interface]
netstat -r [-AenW] [-f address_family] [-M core] [-N system]
netstat -rs [-s] [-M core] [-N system]
netstat -g [-W] [-f address_family] [-M core] [-N system]
netstat -gs [-s] [-f address_family] [-M core] [-N system]
162# ps -ax | grep mysqld
65121 p0 R+J 0:00.00 grep mysqld
162#
162#
162# # /usr/local/etc/rc.d/mysqld stop
#: Command not found.
162# /usr/local/etc/rc.d/mysqld stop
Stopping mysqld: [ FAILED ]
162#
162# /usr/local/etc/rc.d/mysqld start
Starting mysqld: [ OK ]
162# killall -9 mysqld mysqld_safe
No matching processes were found
162# killall -9 mysqld mysqld_safe
No matching processes were found
162#
162# /usr/local/etc/rc.d/mysqld restart
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
162#

same error mysqld not run please help me
 
Last edited:
The error 35 means there would be a deadlock, which means someone else has that locked. That means that most likely another mysql process is running.

Try doing a 'ps -eaf |grep mysql' to find the mysql processes.

Make sure your my.cnf and your php.ini agree on the same location for the mysql.sock file. If they are different then they will never work together.

I see you are using /usr/local/etc/rc.d/mysqld why are you doing that instead of /etc/init.d/mysqld which is where most of the OSs I use keep their init files. You also failed to mention which OS and which method you used to install mysql and php. That would help in figuring out your problem.
 
OK, you did exactly answer the other questions, but I can see based on your reply that you are on FreeBSD, their commands are more "BSD" like than SysV like (go figure), you would want to use 'ps -aux|grep mysql' that should show any mysql processes.

If there aren't any running, and you are still getting the error 35 errors then you might want to try something like:
mv ibdata1 ibdata1.bak
cp -a ibdata1.bak ibdata1
in your data directory, that should clear up any weirdness associated with that file. MySQL should then attempt to rebuild that file.
 
tnx
problem fixed..
It seems like it was some innodb corruption.
I've moved:
/home/mysql/ib*

to /root (in case I needed them)
After they were moved out of the way, mysqld started up, and recreated the 3 ib* files
 
Back
Top