サーバーを「自宅サーバー」「Serverman@VPS」から「さくらVPS」に移した過程、
WordPressのDBをdumpしたものを「さくらVPS」で復元して、
WordPressにアクセスすると、MySQLがダウンした!!!
mysqldのサービスが起動しない。
原因は、dumpで復元したDBのInnoDBが壊れていたみたい・・・
なので、「my.cnf」にinnodb_force_recoveryをセットしてサービス起動・修復!
★my.cnf
#値は1~6まで有り、通常は1~4まで修復できるまで段階的に上げる。5~6はDBが壊れるおそれがある?らしい innodb_force_recovery=1
★ログ [/var/log/mysqld.log]
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x30000 /usr/libexec/mysqld(my_print_stacktrace+0x34)[0x83e6f34] /usr/libexec/mysqld(handle_fatal_signal+0x48c)[0x82b6f5c] [0xe16400] [0xe16416] /lib/libc.so.6(gsignal+0x51)[0x7cfb01] /lib/libc.so.6(abort+0x17a)[0x7d13da] /usr/libexec/mysqld[0x844e4b7] /usr/libexec/mysqld[0x844e9d9] /usr/libexec/mysqld[0x8517baa] /usr/libexec/mysqld[0x850dbfe] /usr/libexec/mysqld[0x844d169] /usr/libexec/mysqld[0x843f346] /usr/libexec/mysqld[0x84422c1] /lib/libpthread.so.0[0x94aa49] /lib/libc.so.6(clone+0x5e)[0x88763e] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 120901 16:41:28 mysqld_safe Number of processes running now: 0 120901 16:41:28 mysqld_safe mysqld restarted 120901 16:41:28 [Warning] option 'table_cache': unsigned value 33554432 adjusted to 524288 120901 16:41:28 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 table_cache: 431 120901 16:41:28 [Note] Plugin 'FEDERATED' is disabled. 120901 16:41:28 InnoDB: The InnoDB memory heap is disabled 120901 16:41:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins 120901 16:41:28 InnoDB: Compressed tables use zlib 1.2.3 120901 16:41:28 InnoDB: Using Linux native AIO 120901 16:41:28 InnoDB: Initializing buffer pool, size = 256.0M 120901 16:41:28 InnoDB: Completed initialization of buffer pool 120901 16:41:28 InnoDB: highest supported file format is Barracuda. InnoDB: Log scan progressed past the checkpoint lsn 967347248 120901 16:41:28 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... InnoDB: Doing recovery: scanned up to log sequence number 967859184 120901 16:41:29 InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percents: 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 InnoDB: Apply batch completed 120901 16:41:29 InnoDB: Waiting for the background threads to start ^C ----------------------------------------------------------------------------------------------- /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql tail -f /var/log/mysqld.log /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock grep mysql Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
★参考URL
・[ MySQL 5.1 リファレンスマニュアル] 13.5.8.1 InnoDB 復旧の強制
・[アークウェブシステム開発SandBox] ネットワーク/MySQL、InnoDBのリカバリができず起動できない
・[NOBODY:PLACE] InnoDBをリカバリして学んだこと
・[GRN blog] MYSQLのinnodbの復旧方法
スポンサードリンク
コメント