Results 1 to 9 of 9
I am not able to get mysql re-started on my OpenSuse11.1 box. I was working on a php web app and suddenly got a white screen on my application. I ...
- 06-14-2009 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- USA
- Posts
- 221
MySQL Will Not Restart
I am not able to get mysql re-started on my OpenSuse11.1 box. I was working on a php web app and suddenly got a white screen on my application. I have never had this happen. I googled the following and was not able to find anything useful to help me.
checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld
I do not have the following file - /var/lib/mysql/mysqld.pid
Is it supposed to be there?
Here is the output from my command line.
linux-20k5:~ # rcmysql restart
Restarting service MySQL
Shutting down service MySQL done
checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld
Starting service MySQL done
linux-20k5:~ #
-MikeSuse Linux Enterprise Server 11
Suse Linux Enterprise Server 10 - SP3
OpenSuse 11.2, KDE 4.3.1
- 06-14-2009 #2Linux Newbie
- Join Date
- Apr 2009
- Posts
- 160
Did you just do an update or something?
I found something that I can't post cuz I haven't posted enough times in the forums.
binlog format=mixed seems to be a culprit.
As in:
I looked at the various my.cnf* files in /etc and all but the
my.cnf.rpmnew had a reference to binlog format=mixed. After mv the
my.cnf for back, i did a cp my.cnf.rpmnew my.cnf and this was the
result:
rcmysql start
checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld
Updating MySQL privilege database...
Looking for 'mysql' in: /usr/bin/mysql
Looking for 'mysqlcheck' in: /usr/bin/mysqlcheck
Running 'mysqlcheck'...
mysql.columns-priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general-log
Error : Can't find file: 'general-log' (errno: 2)
error : Corrupt
mysql.help-category OK
mysql.help-keyword OK
mysql.help-relation OK
mysql.help-topic OK
mysql.host OK
mysql.ndb-binlog-index OK
mysql.plugin OK
mysql.proc OK
mysql.procs-priv OK
mysql.servers OK
mysql.slow-log
Error : Can't find file: 'slow-log' (errno: 2)
error : Corrupt
mysql.tables-priv OK
mysql.time-zone OK
mysql.time-zone-leap-second OK
mysql.time-zone-name OK
mysql.time-zone-transition OK
mysql.time-zone-transition-type OK
mysql.user OK
Repairing tables
mysql.general-log
Error : Can't find file: 'general-log' (errno: 2)
error : Corrupt
mysql.slow-log
Error : Can't find file: 'slow-log' (errno: 2)
error : Corrupt
Running 'mysql-fix-privilege-tables'...
OK
Starting service MySQL
done
- 06-14-2009 #3Linux Newbie
- Join Date
- Feb 2007
- Location
- USA
- Posts
- 221
No I have not run an update. I am not familiar with what you mean by "binlog format=mixed seems to be a culprit". This is my first time troubleshooting the mysql service.
Also, I only have 2 mysql files in /etc:
my.cnf
mysqlaccess.confSuse Linux Enterprise Server 11
Suse Linux Enterprise Server 10 - SP3
OpenSuse 11.2, KDE 4.3.1
- 06-14-2009 #4Linux Newbie
- Join Date
- Apr 2009
- Posts
- 160
is there anyting in /var/log/mysqld.log ?
also , as root do
also dops aux | grep mysql
ls -al /var/lib/mysql/mysqld.pid
/var/lib/mysql/mysqld.pid should alos be owned by user mysql and group mysql
Post results here.
- 06-14-2009 #5Linux Newbie
- Join Date
- Feb 2007
- Location
- USA
- Posts
- 221
Mikesd,
Thanks for pointing me in the directions of looking at /var/log/mysqld.log. (By the way this file had a symlink icon but I was still able to view it in K-write).
I am stunned that this was due to a disk full error. This was unsuspecting to me because my dev box is 160GB and has about 80GB Free. For someone reason, the partition that MySQL is located in was only allocated 20GB and was full. When I installed OpenSuse 11.1, I went with the default partition options so I never thought space would be an issue.
I freed up space, restarted mysql, and then had to repair a log table for my web app via phpMyAdmin. All is good now. Thanks again!!
-Mike
Number of processes running now: 0
090613 22:25:11 mysqld restarted
090613 22:25:11 InnoDB: Started; log sequence number 0 56810
090613 22:25:11 [ERROR] /usr/sbin/mysqld: Error writing file '/var/lib/mysql/mysqld.pid' (Errcode: 2
090613 22:25:11 [ERROR] Can't start server: can't create PID file: No space left on deviceSuse Linux Enterprise Server 11
Suse Linux Enterprise Server 10 - SP3
OpenSuse 11.2, KDE 4.3.1
- 06-14-2009 #6
It good idea to set the SQL databases to their own partition. This makes back up easier and space management also. By default the databases will be on the root partition and this is normally relatively small. It is just a matter of mounting a partition at the point in the directory structure where the databases are stored.
- 06-14-2009 #7Linux Newbie
- Join Date
- Feb 2007
- Location
- USA
- Posts
- 221
Thanks gogalthorp!
Is it best to set up the partitions at OS install? Or can this still be done after initial installation?
I have not done anything with custom paritioning, but I guess this would be a good time to learn. Of course I will do all of my experimenting on my dev box first.
-MikeSuse Linux Enterprise Server 11
Suse Linux Enterprise Server 10 - SP3
OpenSuse 11.2, KDE 4.3.1
- 06-15-2009 #8Linux Newbie
- Join Date
- Apr 2009
- Posts
- 160
You should possibly look into checking if logrotate is working.
My /var partition is only 13 Gig, and I'm using less than a gig, so I suspect your logs aren't rotating properly.Filesystem Size Used Avail Use% Mounted on
/dev/sdb4 13G 851M 12G 7% /var
- 06-15-2009 #9
It is best to set the partitions and mount points at install, but you could use gparted or other partitioning software to resize and create a new partition. You should of course backup because it would be bad if you lost power when redoing low level stuff.
Initially mount the new partition to a temp point then copy any files/directories from the old data area to the new. Remove all below the old directory then use this as the new mount point for the new partition. Things should look the same just the data will be stored on it's own partition.


Reply With Quote