mysql - MySQL 无法启动
问题描述
在 Centos 中启动 MySQL 失败(命令:service mysqld start)。在我的 php 应用程序中获取“mysqli_connect(): (HY000/2002): No such file or directory”。并且不确定它是否崩溃,因为我在安装应用程序时不小心将根目录的所有权设置为 root。我尝试将 var/lib/mysql 改回 mysql:mysql,并删除了 3 个 ibd 日志文件,但仍然没有运气。并在mysqld.log中发现如下错误,并没有再生成错误日志:
0x7f25c61fc700 InnoDB: Assertion failure in thread 139800214488832 in
file ut0ut.cc line 942
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.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
08:19:01 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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=77
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 = 68195 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 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0xf52f35]
/usr/sbin/mysqld(handle_fatal_signal+0x4a4)[0x7d3754]
/lib64/libpthread.so.0(+0xf7e0)[0x7f262e8c17e0]
/lib64/libc.so.6(gsignal+0x35)[0x7f262d3614f5]
/lib64/libc.so.6(abort+0x175)[0x7f262d362cd5]
/usr/sbin/mysqld(_Z18ut_print_timestampP8_IO_FILE+0x0)[0x7c28a8]
/usr/sbin/mysqld(_ZN2ib5fatalD1Ev+0xb3)[0x11a2113]
/usr/sbin/mysqld(_Z16buf_page_get_genRK9page_id _tRK11page_size_tmP11buf_block_tmPKcmP5mtr_tb+0x1606)[0x11e3826]
/usr/sbin/mysqld(_Z27btr_cur_search_to_nth_levelP12dict_ index_tmPK8dtuple_t15page_cur_mode_tmP9btr_cur_tmPKcmP5mtr_t+0x840)[0x11c5fe0]
/usr/sbin/mysqld(_Z29row_ins_clust_index_entry_lowmmP12dict_ index_tmP8dtuple_tmP9que_thr_tb+0x252)[0x10f1e62]
/usr/sbin/mysqld(_Z25row_ins_clust_index_entryP12dict_index_ tP8dtuple_tP9que_thr_tmb+0xb8)[0x10f5f18]
/usr/sbin/mysqld(_Z12row_ins_stepP9que_thr_t+0x35b)[0x10f828b]
/usr/sbin/mysqld(_Z15que_run_threadsP9que_thr_t+0x5b8)[0x10d5628]
/usr/sbin/mysqld(_Z12fts_eval_sqlP5trx_tP10que_fork_t+0x2d)[0x128d25d]
/usr/sbin/mysqld(_Z14fts_write_nodeP5trx_tPP10que_fork _tP11fts_table_tP12fts_string_tP10fts_node_t+0x1f5)[0x126ef05]
/usr/sbin/mysqld[0x1277418]
/usr/sbin/mysqld(_Z14fts_sync_tableP12dict_table_ tbbb+0x264)[0x127c7e4]
/usr/sbin/mysqld(_Z23fts_optimize_sync_tablem+0x3f)[0x127ed5f]
/usr/sbin/mysqld(_Z19fts_optimize_threadPv+0x16b)[0x12848cb]
/lib64/libpthread.so.0(+0x7aa1)[0x7f262e8b9aa1]
/lib64/libc.so.6(clone+0x6d)[0x7f262d417c4d]
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.
并且 /var/lib/mysql/mysql.sock 变成 /var/lib/mysql/mysql.sock.lock
我还没有尝试过innodb强制恢复,如果我删除锁定文件并重新启动它会起作用吗?
谢谢。
解决方案
推荐阅读
- html - JS 树:使用不接受 base64 图像代码的 CSS 更改图标
- c - 在返回 Go Runtime 之前,Cgo 在 x_cgo_notify_runtime_init_done 中阻塞
- python - JSON格式化导航python
- spring-data-jpa - 我们如何在 Spring Data JPA 中创建通用存储库?
- r - 在 R 中出现“尝试应用非功能”错误
- c# - 使用 Google API for .NET 从 gDrive 下载文件的问题
- python - 在django中迁移模型时如何解决SQLdecode错误?
- google-colaboratory - 什么是 google colab 中的“私人输出”模式?
- rust - if-let 语句,在仍然借用的时候放在这里
- netlogo - Netlogo - 将标签定位在中心