运行wordpress安装并尝试在我的Ubuntu服务器上登录wp-admin后,出现“建立连接到db的错误”错误。这是运行WP安装后的error.log:
170708 6:05:02 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full n$
170708 6:05:02 [Note] Plugin 'FEDERATED' is disabled.
170708 6:05:02 InnoDB: The InnoDB memory heap is disabled
170708 6:05:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170708 6:05:02 InnoDB: Compressed tables use zlib 1.2.8
170708 6:05:02 InnoDB: Using Linux native AIO
170708 6:05:02 InnoDB: Initializing buffer pool, size = 128.0M
170708 6:05:02 InnoDB: Completed initialization of buffer pool
170708 6:05:02 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1332282360
170708 6:05:02 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 1332887786
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1 row operations to undo
InnoDB: Trx id counter is 13E200
170708 6:05:02 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 11 12 13 14 15 16 17 18 19 20 21 22 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 6$
InnoDB: Apply batch completed
InnoDB: Cleaning up trx with id 13DA6A
170708 6:05:02 InnoDB: Waiting for the background threads to start
170708 6:05:03 InnoDB: 5.5.37 started; log sequence number 1332887786
170708 6:05:03 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
170708 6:05:03 [Note] - '127.0.0.1' resolves to '127.0.0.1';
170708 6:05:03 [Note] Server socket created on IP: '127.0.0.1'.
170708 6:05:03 InnoDB: Assertion failure in thread 139675398293248 in file trx0purge.c line 840
InnoDB: Failing assertion: purge_sys->purge_trx_no <= purge_sys->rseg->last_trx_no
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
10:05:03 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346700 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
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/sbin/mysqld(my_print_stacktrace+0x20)[0x7f08d3614c70]
170708 6:05:03 [Note] Event Scheduler: Loaded 0 events
170708 6:05:03 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.37-0ubuntu0.14.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
/usr/sbin/mysqld(handle_fatal_signal+0x3d5)[0x7f08d34ff6d5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f08d2291340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7f08d18e7f79]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f08d18eb388]
/usr/sbin/mysqld(+0x588b65)[0x7f08d36aeb65]
/usr/sbin/mysqld(+0x5896b9)[0x7f08d36af6b9]
/usr/sbin/mysqld(+0x64acdf)[0x7f08d3770cdf]
/usr/sbin/mysqld(+0x641595)[0x7f08d3767595]
/usr/sbin/mysqld(+0x58b525)[0x7f08d36b1525]
/usr/sbin/mysqld(+0x57d13c)[0x7f08d36a313c]
/usr/sbin/mysqld(+0x581213)[0x7f08d36a7213]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f08d2289182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f08d19ac30d]
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.
170708 6:05:04 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full n$
170708 6:05:04 [Note] Plugin 'FEDERATED' is disabled.
170708 6:05:04 InnoDB: The InnoDB memory heap is disabled
170708 6:05:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170708 6:05:04 InnoDB: Compressed tables use zlib 1.2.8
170708 6:05:04 InnoDB: Using Linux native AIO
170708 6:05:04 InnoDB: Initializing buffer pool, size = 128.0M
170708 6:05:04 InnoDB: Completed initialization of buffer pool
170708 6:05:04 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1332284392
170708 6:05:04 InnoDB: Database was not shut down normally!
然后我尝试启动我的MySQL:
sudo /etc/init.d/mysql start
我在error.log中得到了这个:
170708 06:06:23 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170708 6:06:23 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170708 6:06:23 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full n$
170708 6:06:23 [Note] Plugin 'FEDERATED' is disabled.
170708 6:06:23 InnoDB: The InnoDB memory heap is disabled
170708 6:06:23 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170708 6:06:23 InnoDB: Compressed tables use zlib 1.2.8
170708 6:06:23 InnoDB: Using Linux native AIO
170708 6:06:23 InnoDB: Initializing buffer pool, size = 128.0M
170708 6:06:23 InnoDB: Completed initialization of buffer pool
170708 6:06:23 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1332284392
170708 6:06:23 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 1332887786
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 1 row operations to undo
InnoDB: Trx id counter is 13E200
170708 6:06:23 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 11 12 13 14 15 16 17 18 19 20 21 22 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 6$
InnoDB: Apply batch completed
InnoDB: Cleaning up trx with id 13DA6A
170708 6:06:23 InnoDB: Waiting for the background threads to start
170708 6:06:24 InnoDB: 5.5.37 started; log sequence number 1332887786
170708 6:06:24 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
170708 6:06:24 [Note] - '127.0.0.1' resolves to '127.0.0.1';
170708 6:06:24 [Note] Server socket created on IP: '127.0.0.1'.
170708 6:06:24 InnoDB: Assertion failure in thread 140384662005504 in file trx0purge.c line 840
InnoDB: Failing assertion: purge_sys->purge_trx_no <= purge_sys->rseg->last_trx_no
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
10:06:24 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346700 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
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/sbin/mysqld(my_print_stacktrace+0x20)[0x7fadf2b5bc70]
/usr/sbin/mysqld(handle_fatal_signal+0x3d5)[0x7fadf2a466d5]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7fadf17d8340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fadf0e2ef79]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fadf0e32388]
/usr/sbin/mysqld(+0x588b65)[0x7fadf2bf5b65]
/usr/sbin/mysqld(+0x5896b9)[0x7fadf2bf66b9]
/usr/sbin/mysqld(+0x64acdf)[0x7fadf2cb7cdf]
/usr/sbin/mysqld(+0x641595)[0x7fadf2cae595]
/usr/sbin/mysqld(+0x58b525)[0x7fadf2bf8525]
/usr/sbin/mysqld(+0x57d13c)[0x7fadf2bea13c]
/usr/sbin/mysqld(+0x581213)[0x7fadf2bee213]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7fadf17d0182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fadf0ef330d]
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.
170708 06:06:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
这些错误对我没有任何意义,请指出我正确的方向来解决这个问题。
干杯