mysql fails to start
I had something interesting happen today with mysql.
I was testing a perl module, and it failed to do database operation. It failed to CREATE a database.
This was my error..
[root@moonshine DMS2]# perl t/49_DMSSearch_3_files_of_type.t # DMS::Test # loaded testing conf /root/devel/DMS2/t/dms.conf mysqladmin: DROP DATABASE dmsdb_testing failed; error: 'Can't drop database 'dmsdb_testing'; database doesn't exist' drop failed .. [mysqladmin -f drop dmsdb_testing], 256 - this is ok if you're running the test from scratch. at t/49_DMSSearch_3_files_of_type.t line 8 mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'dmsdb_testing' (errno: 28)' make failed .. [mysqladmin -f create dmsdb_testing], 256 at /usr/lib/perl5/site_perl/5.8.8/DMS/Test.pm line 394
So… I wanted to check that mysqld was working.
[root@moonshine DMS2]# /etc/init.d/mysqld status mysqld (pid 26734) is running... [root@moonshine DMS2]# /etc/init.d/mysqld restart Stopping MySQL: [ OK ] Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED]
WTF? Right? So.. I checked error messages with ‘dmesg’- and nothing.
So.. I looked for a mysql lock.. in /var/lock/subsys/mysql .. no lock.
Then.. just for the hell of it I checked the space on the drive with ‘df -h’, there was no space on the drive.
So, I cleared some space, and now it works!
[root@moonshine DMS2]# /etc/init.d/mysqld start Starting MySQL: [ OK ]
Why am I mentioning this?
It’s not obvious that if mysql fails to start/restart, and there are not error messages, that you should check disk space.