Mysql won't start - ibdata1 corrupt? - operati

2020-02-02 10:43发布

Server shutdown from power failure.
Mysql will not start now.
Disk is not full. Syslog is below

Oct 11 15:03:31 joe mysqld_safe[24757]: started
Oct 11 15:03:31 joe mysqld[24760]: 101011 15:03:31  InnoDB: Operating system error number 13 in a file operation.
Oct 11 15:03:31 joe mysqld[24760]: InnoDB: The error means mysqld does not have the access rights to
Oct 11 15:03:31 joe mysqld[24760]: InnoDB: the directory.
Oct 11 15:03:31 joe mysqld[24760]: InnoDB: File name ./ibdata1
Oct 11 15:03:31 joe mysqld[24760]: InnoDB: File operation call: 'create'.
Oct 11 15:03:31 joe mysqld[24760]: InnoDB: Cannot continue operation.

14条回答
混吃等死
2楼-- · 2020-02-02 11:45

In my siuation is Selinux's problem. And the
chcon -R --type=mysql_db_t /new/mysql/dir comes error:
chcon: failed to change context of /new/mysql/dir to root:object_r:mysql_db_t: Invalid argument.
So i use the command:chcon -R root:object_r:mysqld_db_t /new/mysql/dir.

查看更多
ゆ 、 Hurt°
3楼-- · 2020-02-02 11:45

If you have this problem on a Synology NAS you can fix it by following the advice of the Synology support team:

Dear User,

This has been confirmed as a known issue and we will try to fix this issue in further MariaDB release. Sorry for your inconvenience.

Here is the workaround:

  • Please try to telnet to your DS with "root" account and password (same as admin's)
  • run the command "echo 1 > /var/services/mysql/VERSION"
  • open MariaDB package from DSM will trigger update again
  • type in the DB password and click Update will fix this issue

More info: Synology forum

查看更多
登录 后发表回答