Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm executing the following command in a shell script and I'm executing this on an RHEL-6 server and MySQL version 5.1.47-

mysqld_safe --defaults-extra-file=/custom/path/of/my.cnf

The path of my.cnf can be anything. (If I am not wrong, as a developer we cannot determine where mysql could be installed.) After the above command in the script, there are a few mysql commands to be executed. When the script executes the above command, the output console displays that the mysql service has successfully started. But when the control comes to the part where the mysql commands are to be executed, the following error message comes up-

mysqld dead but subsys locked

Any idea where I am going wrong?

This is what my my.cnf contains-

[mysqld]
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1
innodb_file_io_threads=4
max_binlog_size=20M
max_allowed_packet=16M
max_connections=500
log_bin=logFile.log
binlog-do-db=test
server-id=1
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
binlog-format=ROW
log_warnings=1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
share|improve this question

migrated from stackoverflow.com May 7 '13 at 14:53

This question came from our site for professional and enthusiast programmers.

    
This is not a programming question as it has nothing to do with your script. It is a mysqld support question and should be asked on an appropriate forum. –  Amardeep May 7 '13 at 11:39

1 Answer 1

For me, this means that the daemon has crashed and was restarted, but the lockfile that mysqld uses to prevent multiple daemons from accessing the same database is still there...

I fix it with

service mysqld stop
service mysqld start

Not sure if you can just to a restart instead of a stop then start, and I haven't figured out the cause yet for the crash either.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.