Как восстановить базу данных из /var/lib/mysql?

Уже нашел вот этот вопрос

Так же закачали папку и пытаемся завести старую базу. В табличке индексы полей и т.д видно, но некоторые таблицы не открываются.
Проблема заключается в том, что по команде /etc/init.d/mysql restart удаляется /run/mysqld/mysqld.sock.
Пересоздаю его ручками, как сказано там, при рестарте сразу пропадает из папки и в итоге ошибка. То есть залип на пункте с
lsof: status error on /run/mysqld/mysqld.sock: No such file or directory
lsof 4.86


spoiler
ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT ' at line 1
151124  1:48:05 [ERROR] Aborting
ERROR: 1050  Table 'plugin' already exists
151124  1:48:10 [ERROR] Aborting
151124 13:54:29 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/tables_priv.frm'
ERROR: 1033  Incorrect information in file: './mysql/tables_priv.frm'
151124 13:54:29 [ERROR] Aborting
151124 13:54:29 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:54:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:54:29 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:54:29 [ERROR] Aborting
151124 13:54:29 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:54:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:54:29 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:54:29 [ERROR] Aborting
151124 13:54:30 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:54:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:54:30 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:54:30 [ERROR] Aborting
151124 13:54:30 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:54:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:54:30 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:54:30 [ERROR] Aborting
151124 13:54:31 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:54:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:54:31 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:54:31 [ERROR] Aborting
151124 13:55:46 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/tables_priv.frm'
ERROR: 1033  Incorrect information in file: './mysql/tables_priv.frm'
151124 13:55:46 [ERROR] Aborting
151124 13:55:46 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:55:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:55:46 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:55:46 [ERROR] Aborting
151124 13:55:47 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:55:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:55:47 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:55:47 [ERROR] Aborting
151124 13:55:47 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:55:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:55:47 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:55:47 [ERROR] Aborting
151124 13:55:48 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:55:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:55:48 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:55:48 [ERROR] Aborting
151124 13:58:54 [ERROR] /usr/sbin/mysqld: Incorrect information in file: './mysql/tables_priv.frm'
ERROR: 1033  Incorrect information in file: './mysql/tables_priv.frm'
151124 13:58:54 [ERROR] Aborting
151124 13:58:54 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:58:54 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:58:54 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:58:54 [ERROR] Aborting
151124 13:58:54 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:58:54 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:58:54 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:58:54 [ERROR] Aborting
151124 13:58:55 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:58:55 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:58:55 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:58:55 [ERROR] Aborting
151124 13:58:55 [ERROR] Plugin 'InnoDB' init function returned error.
151124 13:58:55 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151124 13:58:55 [ERROR] Unknown/unsupported storage engine: InnoDB
151124 13:58:55 [ERROR] Aborting
ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT ' at line 1
151124 14:00:48 [ERROR] Aborting
ERROR: 1050  Table 'plugin' already exists
151124 14:00:52 [ERROR] Aborting

  • Вопрос задан
  • 603 просмотра
Решения вопроса 1
martin74ua
@martin74ua Куратор тега MySQL
Linux administrator
читаем логи.

ЗЫ. Читаю документацию вслух. Дорого. Предоплата.

И формулируйте вопросы правильно. Восстановить базу из дампа можно. А /var/lib/mysql - это не дампы. Это непосредственно рабочая база.
Надеюсь ее хотя бы с выключенного сервера копировали...
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
@azazelpw
Linux SA
Права на /var/lib/mysql правильно установлены?
Кроме этой ошибки есть еще?
cat /var/log/mysql/error.log |grep ERROR
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы