MySQL5.0 が停止できないときは、kill -9 プロセスID
ちょーアドホックな対応をご紹介。
LinuxESに rpm でインストールした MySQL5.0が停止できなくなりました。
停止方法
# /etc/init.d/mysql stop
エラーログを見ると以下が出力されていました。
070607 21:34:06 mysqld started 070607 21:34:06 InnoDB: Error: cannot allocate 2147500032 bytes of InnoDB: memory with malloc! Total allocated memory InnoDB: by InnoDB 35494096 bytes. Operating system errno: 12 InnoDB: Check if you should increase the swap file or InnoDB: ulimits of your operating system. InnoDB: On FreeBSD check you have compiled the OS with InnoDB: a big enough maximum process size. InnoDB: Note that in most 32-bit computers the process InnoDB: memory space is limited to 2 GB or 4 GB. InnoDB: We keep retrying the allocation for 60 seconds... InnoDB: Fatal error: cannot allocate the memory for the buffer pool 070607 21:35:06 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.0.37-community-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition (GPL) 070607 21:35:32 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './DB/TABLE.frm' 070607 21:35:32 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './DB/TABLE.frm' 070607 21:49:39 [Note] /usr/sbin/mysqld: Normal shutdown 070607 21:49:41 [Warning] /usr/sbin/mysqld: Forcing close of thread 3 user: 'DB'
解決策を見つけられず、壊れても仕方がないと以下を実施。
# kill -0 "mysqlプロセスID"
なんと復活してくれました。。
毎度感じますが、PostgreSQLに比べてMySQLは不安定だなぁ。
と他人事のように言っておきます。
ちょーアドホックw