LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2004, 04:09 PM   #1
stevanbt
LQ Newbie
 
Registered: Dec 2004
Location: uk
Distribution: Ubuntu
Posts: 20

Rep: Reputation: 0
Unhappy Problem with MySql


All,
I'm having trouble running MySql under Fedora Core 3. When I start/restart MySql I get the following:-
mysqld dead but subsys locked

I've seen similar problems, and I think I've tried all the solutions - but no joy.

My system setup is as follows:-
AMD 2600+ laptop
512 meg of memory
Fedora Core 3 + all latest updates
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

I've ran mysql_install_db.

Output of ll on /var/lib/:-
total 20
drwx------ 2 mysql mysql 4096 Dec 3 17:06 mysql
srwxrwxrwx 1 mysql mysql 0 Dec 3 21:40 mysql.sock
drwx------ 2 mysql mysql 4096 Dec 3 17:06 test


Output of more /var/log/mysql.log:-
041203 17:22:05 mysqld started
041203 17:22:05 mysqld ended

041203 20:26:10 mysqld started
041203 20:26:10 mysqld ended

041203 20:26:24 mysqld started
041203 20:26:24 mysqld ended

041203 20:27:26 mysqld started
041203 20:27:26 mysqld ended

041203 21:40:24 mysqld started
041203 21:40:24 mysqld ended


Contents of /etc/my.cnf:-
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Output of /etc/init.d/mysqld status:-
mysqld dead but subsys locked


I've deleted /var/lock/subsys/mysqld prior to starting mysql, but it makes no difference. Starting mysql creates another lock though.

This is driving me insane, so any help would be most welcome.

TIA, Steve.
 
Old 12-09-2004, 06:14 AM   #2
niina
LQ Newbie
 
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
Hi everybody,

I have same problem. Is this some kind of bug? Please help.

Fedora core 3

mysql-server-3.23.58-13
mysql-3.23.58-13
perl-DBD-MySQL-2.9003-5
 
Old 12-11-2004, 10:39 PM   #3
Lil Freek
LQ Newbie
 
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
geez. I'm having the same problem.

"mysqld dead but subsys locked" when in the services window on Fedora Core 3, using KDE

if i go through Terminal, I get "Timeout error occured trying to start MySQL Daemon."

any help would be appreciated.
 
Old 12-12-2004, 09:51 PM   #4
the_tflk
Member
 
Registered: Jul 2003
Location: MA
Distribution: Ubuntu
Posts: 35

Rep: Reputation: 16
This seems to be quite a popular problem - same deal here.
I have Fedora Core 3, packages installed (using yum) :

mysql-server-3.23.58-13
libdbi-dbd-mysql-0.6.5-9
mysql-3.23.58-13
php-mysql-4.3.9-3
mysql-devel-3.23.58-13

I cannot find anything, anywhere that describes how to properly fix this, instead I find lots of posts that reiterate our problem.
Happy hunting!
 
Old 12-13-2004, 10:59 PM   #5
pim42
LQ Newbie
 
Registered: May 2004
Posts: 7

Rep: Reputation: 0
Same problem here too.
 
Old 12-16-2004, 02:54 PM   #6
zeidolon
LQ Newbie
 
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
Same here, Fedora 3.
 
Old 12-23-2004, 05:44 PM   #7
lanewaves
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
and me....Fedor Core 3
 
Old 12-23-2004, 07:34 PM   #8
Butt-Ugly
Member
 
Registered: Nov 2004
Location: Brisbane, Australia
Distribution: Fedora Core 5
Posts: 89

Rep: Reputation: 15
Damn bugs

Well Im not sure if it is a bug, but the following steps should at least try to provide some level of normality for you. The "/var/lock/subsys/mysqld" should be removed automatically by the initscripts when the service is stopped, it might be looking at the wrong pid file.

1. Obviously the 'ole check the log file for anything nasty

cat /var/log/mysqld.log

2. Stop the service

service mysqld stop

3. Check to see if the service stopped, it might be calling the wrong pid.

ps aux | grep mysql

4. Kill any mysql process that might still be running.

kill -9 ??? ???

5. (*CAREFUL*) Remove/move/backup any databases from the data directory, only do this step if you need to.

rm -Rf /var/lib/mysql/*

6. Check your global options configuration file, should be similar to stevanbt's initial post.

cat /etc/my.cnf

7. Copy over one of the preconfigured 'sample' server-specific options file. Global (/etc/my.cnf) file has priority over server-specific file, but these have more options in them and have been tuned for a certain role.

cp /usr/share/doc/mysql-server-?.??.??/my-small.cnf /var/lib/mysql

8. Recreate the initial databases, this step is optional as the initscripts will do this anyway.

mysql_install_db

9. Check and set the runlevels for the service.

chkconfig --level 345 mysqld on
chkconfig --list mysqld

10. Start the service.

service mysqld start

11. Check the log file (step 1)

Thats just a basic step through check, most of you have probably already done this.

Hope it helps..

Miles.
 
Old 01-17-2005, 09:15 AM   #9
dasdoc
LQ Newbie
 
Registered: Jan 2005
Location: Temple Texas
Distribution: Centos 3.3
Posts: 1

Rep: Reputation: 0
Wink mysqld dead but subsys locked

I had the same problem after restoring from a system crash.

I fixed it with

#yum install mysql-server

yada, yada, yada

Installed: mysql-server 3.23.58-2.3.i386
Transaction(s) Complete
[root@Sambaserver init.d]# ./mysqld start
Starting MySQL: [ OK ]
[root@Sambaserver init.d]#


Hope that helps.
 
Old 01-26-2005, 10:29 PM   #10
homerrocks
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
SELinux

Running FC3 and had the same problem. Found this on MYSQL.com and it worked great. It was an SELinux thing for me.

http://forums.mysql.com/read.php?11,...1556#msg-11556

This part is really all I tried. I skipped the first part. Obviously a try at your own risk thing but I was frustrated and desparate,

"From Startmenu select
"System settings"
Then choose
"Security settings or security level"
A window appears with 2 tabs : "Firewall options" and "SELinux"
Choose SELinux.
At the bottom half of the window you have a lisbox, listing (at least on my PC)

Apache
Name Service
NIS
SELinux Service Protection

Open SELinux Service Protection
Select "Disable SELinux protection for mysqld daemon"
Click "OK""

You may have to reboot.
 
Old 03-01-2005, 03:05 PM   #11
mda127
LQ Newbie
 
Registered: Mar 2005
Location: State College, PA
Distribution: fedora core 3, ubuntu
Posts: 5

Rep: Reputation: 0
mysqld dead but subsys locked

I had the same problem using Fedora Core 3 and this is what I did to fix it. I'll assume that it'll work for the other Fedora Core's (but I won't garuntee it). First of all, make sure you are the root user. Then use yum[1] to remove mysql-server:

# su
Password:
# yum remove mysql-server

After yum removes mysql-server, you have to go in and manually remove any other conflicting mysql elements:

# rm -rf /var/lib/mysql (Make sure that you don't have any important database files in here. If you do, move them.)
# rm /etc/my.cnf (These two items will be re-installed in the next step.)

The next thing you want to do is re-install mysql-server:

# yum install mysql-server

The last thing to do is start the mysql daemon:

# /etc/init.d/mysqld start

That's it. I hope it works for all of you!!!


[1] The yum.conf file that comes with Fedora is very slow. If you want one that uses faster repositories you can pick it up here:

http://www.phys.psu.edu/~maskey

After you get to the site, right-click the yum.conf file and save link target as. Make sure you change the ownership and group of the file to root (if it isn't already) and replace (or rename) your old yum.conf located in /etc.

# su
Password:
# cd ~/ (Where ~ is the path to the directory that you placed the downloaded yum.conf file.)
# chown root:root yum.conf
# mv /etc/yum.conf /etc/yum.conf.old (This is the yum.conf that comes w/ Fedora.)
# cp ~/yum.conf /etc/ (Where ~ is the path to the directory that you placed the downloaded yum.conf file.)

This should make installing packages much faster.

Last edited by mda127; 03-02-2005 at 07:46 AM.
 
Old 03-31-2005, 11:24 AM   #12
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Thanks for the pointers, I was having a similar problem with mysql on CentOS 4.
 
Old 07-02-2005, 10:18 AM   #13
eunick
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
same problem here im using CentOS release 4.0 (Final).. kindly look at the logs below

[root@puffy init.d]# /etc/rc.d/init.d/mysqld restart
Stopping MySQL: [FAILED]
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
[root@puffy init.d]# /etc/rc.d/init.d/mysqld restart

[root@puffy init.d]# service mysqld status
mysqld dead but subsys locked


any other solution besides reinstalling?
 
Old 07-02-2005, 10:42 AM   #14
eunick
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
ok guys i got the solution.. try this procedure.. because the size of log files do not match the size specified in the my.ini file.

goto /var/lib/mysql or if its a source install.. try to look for the two files below:

ib_logfile0
ib_logfile1

just simply remove these following files

then thats it.. gudluck!!! :-)
 
Old 01-03-2006, 11:07 AM   #15
barnamos
LQ Newbie
 
Registered: Apr 2005
Location: colorado
Distribution: mandriva
Posts: 27

Rep: Reputation: 15
didn't work but...

The above didn't work for me but for my similar issue
logfile stated:

/usr/sbin/mysqld: Can't read dir of '/web/.mysql/.tmp/

I didn't have a .tmp dir anymore. Who knows why except it was a removable drive that got moved around. I made the .tmp dir and it started fine.


 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
mysql 4.0.24 to mysql 4.1.12 upgrade problem tuxrules Slackware 7 08-13-2005 06:43 PM
MySQL server problem after linking (mysql.sock) ewijaya Linux - General 4 01-19-2004 09:46 AM
MySQL mysql-3.23.56-1.9, rpm install problem jacsmith510 Linux - Newbie 3 09-19-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration