首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MariaDB服务器无法启动

问MariaDB服务器无法启动
EN

Stack Overflow用户
提问于 2017-07-16 17:43:10
回答 3查看 7.1K关注 0票数 0

我的MariaDB服务器有一些问题-它不会再启动了。每次我开始尝试启动服务器时,它都失败了:

代码语言:javascript
复制
root# /etc/init.d/mysql start
[....] Starting mysql (via systemctl): mysql.service
Job for mysql.service failed. See 'systemctl status mysql.service' and 
'journalctl -xn' for details.
failed!

我已经试过了

  • 重新启动整个系统
  • 重新启动mysql服务(正常和安全模式) ->启动失败
  • 检查/var/lib/mysqld的权限
  • 重新安装MariaDB将innodb_force_recovery =6添加到my.cnf

这是我的lates日志文件:

代码语言:javascript
复制
170716 19:27:14 [Note] InnoDB: Using mutexes to ref count buffer pool pages
170716 19:27:14 [Note] InnoDB: The InnoDB memory heap is disabled
170716 19:27:14 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
170716 19:27:14 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
170716 19:27:14 [Note] InnoDB: Compressed tables use zlib 1.2.8
170716 19:27:14 [Note] InnoDB: Using Linux native AIO
170716 19:27:14 [Note] InnoDB: Not using CPU crc32 instructions
170716 19:27:14 [Note] InnoDB: Initializing buffer pool, size = 128.0M
170716 19:27:14 [Note] InnoDB: Completed initialization of buffer pool
170716 19:27:14 [Note] InnoDB: Highest supported file format is Barracuda.
170716 19:27:14 [Note] InnoDB: The log sequence numbers 4530292 and 4530292 in ibdata files do not match the log sequence number 5818903 in the ib_logfiles!
170716 19:27:14 [Note] InnoDB: Database was not shutdown normally!
170716 19:27:14 [Note] InnoDB: Starting crash recovery.
170716 19:27:14 [Note] InnoDB: Reading tablespace information from the .ibd files...
170716 19:27:14 [Note] InnoDB: Restoring possible half-written data pages 
170716 19:27:14 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Error: trying to access page number 4294896896 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
2017-07-16 19:27:14 76f26000  InnoDB: Assertion failure in thread 1995595776 in file fil0fil.cc line 5612
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.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
170716 19:27:14 [ERROR] 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.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

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.

Server version: 10.0.30-MariaDB-0+deb8u2
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 465934 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 = 0x0 thread_stack 0x30000
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.
addr2line: 'mysqld': No such file

我不知道下一步该怎么做。我可以找到的每一个恢复指南都备份了ibd*文件和图表目录,然后用innodb_force_recovery =6或innodb_force_recovery =4对服务器进行重定向,所有操作都会对它们产生影响。

有谁有主意吗?

提前感谢

EN

回答 3

Stack Overflow用户

发布于 2022-09-05 16:13:57

我也有同样的问题。检查系统日期和时区信息。使用timedatectl命令。使用ntp的服务器在默认情况下是活动的,使NTP禁用并设置日期和时区正确。重新启动,一切都会好起来的。希望能帮上忙。

票数 1
EN

Stack Overflow用户

发布于 2017-07-16 17:51:28

尝试使用innodb_force_recovery =1并导出转储。导出完成后,将ib*-文件的副本存储在/var/lib/mysql中并删除。在此之后,您应该能够在没有innodb_force_recovery的情况下重新启动mariadb,并导入转储。

票数 0
EN

Stack Overflow用户

发布于 2017-07-19 08:14:10

尝试使用从innodb_force_recovery = 1到innodb_force_recovery = 6的交替运行mysql。当mysql启动时,尝试转储数据库并在测试节点上还原它。如果一切正常,请尝试在没有innodb_force_recovery参数的生产节点上恢复转储。

在还原备份/var/lib/mysql目录之前。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45131621

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档