2017-07-16 113 views
0

我的MariaDB服務器有些問題 - 它不會再啓動了。 每次我開始嘗試啓動服務器失敗:MariaDB服務器無法啓動

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文件

這是我鱸日誌文件:

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 = 6innodb_force_recovery = 4和一切工作再次爲他們。

有沒有人有想法?

預先感謝

回答

0

嘗試使用innodb_force_recovery = 1和導出轉儲。 expore完成後,存儲/ var/lib/mysql中的ib * -files副本並將其刪除。之後,您應該能夠在沒有innodb_force_recovery的情況下重新啓動mariadb,並導入轉儲。

+0

感謝您的回放,但很遺憾'innodb_force_recovery = 1'不會幫助啓動服務器。我仍然在上面的錯誤日誌中發現了相同的錯誤 – make

0

嘗試與交替地從innodb_force_recovery = 1innodb_force_recovery = 6運行MySQL的。 當mysql啓動時,嘗試mysqldump你的數據庫並在測試節點上恢復它。 如果一切正常,請嘗試在沒有innodb_force_recovery參數的情況下恢復生產節點上的轉儲。

恢復備份前/var/lib/mysql目錄。