簡體   English   中英

GitLab數據庫損壞,如何恢復?

[英]GitLab DB corrupted, how to recover?

我的GitLab數據庫(MySQL InnoDB)已損壞(我的硬盤出了點問題),我的最后一次備份是在從6.8升級到6.8.1的過程中執行的

現在我想再次啟動GitLab,但是如果我嘗試使用

/home/git/gitlab/$ bundle exec rake gitlab:backup:restore RAILS_ENV=production

我得到:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

這是因為MySQL未運行,但是如果我嘗試使用service mysql start來啟動它,它將失敗,這是日志:

140616  3:28:26 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future relea$140616  3:28:26 [Note] Plugin 'FEDERATED' is disabled.
^G/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
140616  3:28:26 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140616  3:28:26 InnoDB: The InnoDB memory heap is disabled
140616  3:28:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140616  3:28:26 InnoDB: Compressed tables use zlib 1.2.3.4
140616  3:28:26 InnoDB: Initializing buffer pool, size = 128.0M
140616  3:28:27 InnoDB: Completed initialization of buffer pool
140616  3:28:27  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

如何恢復我的上一次備份而不丟失我的上一次提交?

根據MySQL日志

140616 3:28:26 [錯誤]無法打開mysql.plugin表。 請運行mysql_upgrade創建它。

您必須運行mysql_upgrade命令來升級MySQL模式

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM