MySQL doesn't start after restart

Hi,

A couple of days ago I found my linode to be turned off. It was running fine for months, I have no idea what could've happened. Anyways, it happened around 10 am on July 16th. When I noticed it, of course I started the server but got a whole bunch of errors. I submitted a ticket and they helped me get rid of all but one. This one, however, is preventing my MySQL server to start and therefore my server is still down. :(

I get the following error in /var/log/mysql.log:

060718 18:48:42  mysqld started
060718 18:48:43 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
060718 18:48:43  mysqld ended

Through the ticket system I was told that it's a missing table and to look in the manual. The problem is that the table is there:

[root@li10-76 ~]# ls -al /usr/local/mysql/data/mysql/host.*
-rw-rw----  1 mysql mysql 9148 Jun 29 20:32 /usr/local/mysql/data/mysql/host.frm
-rw-rw----  1 mysql mysql    0 Jun 29 20:32 /usr/local/mysql/data/mysql/host.MYD
-rw-rw----  1 mysql mysql 1024 Jun 29 20:32 /usr/local/mysql/data/mysql/host.MYI

Anybody has any thoughts on what could've happened and how to fix this?

Thanks,

LEC

5 Replies

Hmm… Is there another install of mysql, or rather, another config which is telling mysqld to look for tables in an improper location?

-Chris

Not that I know of. This is what I found:

[root@li10-76 /]# find -name *.cnf
./etc/my.cnf
./usr/libexec/webmin/acl/openssl.cnf
./usr/share/doc/dovecot-0.99.11/dovecot-openssl.cnf
./usr/share/doc/mysql-server-5.0.22/my-large.cnf
./usr/share/doc/mysql-server-5.0.22/my-huge.cnf
./usr/share/doc/mysql-server-5.0.22/my-innodb-heavy-4G.cnf
./usr/share/doc/mysql-server-5.0.22/my-medium.cnf
./usr/share/doc/mysql-server-5.0.22/my-small.cnf
./usr/share/ssl/openssl.cnf
./usr/local/mysql/support-files/my-huge.cnf
./usr/local/mysql/support-files/my-innodb-heavy-4G.cnf
./usr/local/mysql/support-files/my-large.cnf
./usr/local/mysql/support-files/my-medium.cnf
./usr/local/mysql/support-files/my-small.cnf
./usr/local/mysql/mysql-test/std_data/ndb_config_mycnf1.cnf
./usr/local/mysql/mysql-test/std_data/ndb_config_mycnf2.cnf
[root@li10-76 /]#

This just happened after I found my linode off. I have no idea how that happened either.

LEC

make sure the datadir config option is pointing to /usr/local/mysql/data/

Well, I added the datadir line to my my.cnf because it wasn't there and now it works. How on Earth was this running before if I didn't have this line or what deleted this line from my.cfm all of a sudden? Must have been the same thing that turned my linode off. I noticed though that if I do a reboot it just turns the server off, it's not coming back on again. Is that normal?

Anyways, thank you very much OverlordQ for your help.

LEC

@lec:

I noticed though that if I do a reboot it just turns the server off, it's not coming back on again. Is that normal?

Command line reboot from inside the Linode shuts the Linode down OK but the restart fails because some Linode-specific tasks have to be performed prior to booting. This is handled by Linode Platform Manager boot/reboot facility or a reboot command issued from the Lish console.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct