Can't Install MariaDB - Dependency Error?

Found this in log:

[ERROR] /usr/sbin/mysqld: unknown variable log_slow_queries=/var/log/mysql/mysql-slow.log'

So I commented out conf.d/local.cnf

#log_slow_queries=/var/log/mysql/mysql-slow.log'

And installation finally ends succesfully.


Try backing up all files in /var/lib/mysql somewhere. Delete them all and then execute mysql_install_db.

My problem came from removing mysqld and replacing it with mariadb and trying to keep the database files. All other methods failed for me.


Your system has problems running the (post)configure script of the mariadb-server-10.1 package.

First, try to clean the apt cache using apt-get clean and to reinstall the package (please note apt-get autoclean only partially clean the cache).

If that fails, you had to use dpkg -i mariadb-server-10.1 and/or dpkg-reconfigure mariadb-server-10.1 to give a more in-depth looking at the specific error.


sudo shutdown -r now

I know it sounds crazy that rebooting the machine solved the problem on linux, but I doublechecked. However I'm working in my Vagrant machine, not sure for Digital Ocean.

System:

  • Debian 7,
  • mysql installed from dotdeb with a working database,
  • updated MariaDB apt sources and key added,
  • install mariadb-server-10.1 which ended with the same error.

After rebooting everything worked, including the DB now served by MariaDB.