Trying to upgrade MariaDB using Generic Linux package from https://downloads.mariadb.org/mariadb/10.0/#os_group=linux_generic on a Debian 8 server:

  • kernel version 2.6.32-49-pve
  • OpenVZ/Virtuozzo container

Have no issue with MariaDB 10.0.35. The SQL server starts, no issue found. Hence it can not be an issue with files/folders permissions. None of master/slave replication is enabled.

But MariaDB 10.0.36 does not start due to the following errors:

180909 17:04:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
180909 17:04:07 [ERROR] Can't open and lock privilege tables: Table './mysql/servers.MYI' is read only
180909 17:04:07 [Note] Server socket created on IP: ''.
180909 17:04:07 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/host.MYI' is read only
180909 17:04:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/mysqld.pid ended

That's weird, if I roll binaries back to MariaDB 10.0.35 and starts fine again.

The server have selinux disabled, and AppArmor does not seem to be enabled.

root@hosting:/etc/apparmor.d# service apparmor status
● apparmor.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

A fresh installed MariaDB 5.5.x fails the same way even after:

/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql/

it installs all the tables and fails to start afterwards.

So we can't start any other MariaDB version, but 10.0.35.

What else can it be? What do I miss?

Regards, Alex.

1 Answer 1


Changed datadir= in /etc/my.cnf from /home/mysql/ and moved databases to /var/lib/mysql/:

datadir                        = /var/lib/mysql/

and MariaDB 10.0.36 started fine.

But why? What do I miss?

Regards, Alex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.