LoginSignup
2
0

More than 5 years have passed since last update.

MariaDB起動時のエラー(エラーとは言っていない)

Last updated at Posted at 2018-01-24
$ sudo service mysql start
 * Starting MariaDB database server mysqld                                        [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

corruptとか脅してくるmaria様。

$ mysql_upgrade -u panel -p
(略)
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 13

しかし、mysql_upgradeでアップグレードしたら上述のエラーが起きる。

$ apt-cache policy mariadb-server
  Installed: 5.5.57-1ubuntu0.14.04.1
  Candidate: 5.5.58-1ubuntu0.14.04.1
  Version table:
     5.5.58-1ubuntu0.14.04.1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/universe amd64 Packages
 *** 5.5.57-1ubuntu0.14.04.1 0
        100 /var/lib/dpkg/status
     5.5.36-1 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

最新バージョンがあるようだ。

$ sudo apt-get update
(略)
  mariadb-client-5.5 mariadb-client-core-5.5 mariadb-common mariadb-server
  mariadb-server-5.5 mariadb-server-core-5.5 multiarch-support mysql-common
(略)
$ sudo apt-get upgrade

他にも色々更新があったのでまとめて更新。

$ mysql_upgrade -u username -p
(略)
Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 13

しかし、やはりエラーになる。エラー13番ってなんだろ。

#define EACCES          13      /* Permission denied */

Qiitaの記事「errnoの値の定義を探す」より。権限周りらしいのでsudoで試す。

$ sudo mysql_upgrade -u panel -p
This installation of MySQL is already upgraded to 5.5.58-MariaDB, use --force if you still need to run mysql_upgrade

ということで--forceオプションが必要らしい。

$ sudo mysql_upgrade -u panel -p --force
(略)
OK

OKが出たのでMariaDBを再起動してみる。

$ sudo service mysql restart
 * Stopping MariaDB database server mysqld                                   [ OK ] 
 * Starting MariaDB database server mysqld                                   [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

……何がOKだったのだろうか…。
ちなみにこのメッセージは出ても問題ないらしい…。

参照1 参照2 参照3

2
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0