概述:
昨晚非法硬件关机,今早8:56来就发现crm系统打不开了,经过排查是mysql数据库起不来了。直到9:34才弄好。主要原因就是非法关机导致数据库表损坏。而且我的数据库没有备份(内网测试中)。
经过:
1、访问网页,提示错误,连接不到数据库,
2、启动mysql服务,卸载和关闭rpm安装的mysql服务(昨天安装postfix好像yum安装了mysql),用netstat -anp |grep mysqld 命令查看mysql服务没有起来,用mysql -uroot -p也连接不到服务器。
3、查看错误提示:
110726 17:02:23 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110726 17:02:23 [ERROR] /usr/local/mysql/libexec/mysqld: Table './mysql/host' is marked as crashed and last (automatic?) repair failed
110726 17:02:23 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/host' is marked as crashed and last (automatic?) repair failed
110726 17:02:23 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid ended
110726 17:24:31 mysqld_safe Sta