MariaDB version 10.3 has been released about half a year ago (January 18th 2018). If you are planning on updating from 10.2 to 10.3 please read this post, otherwise you may have a problem of your MariaDB server not starting. This short post explains on why you have to make small changes in your my.cnf and how to do it to update without downtime or bugfixing.
I recently updated and upgraded my MacBook’s Homebrew packages as well as our servers apt packages. With this update MariaDB is updated to the latest stable 10.3.7. The problem was, that after this update my MariaDB server didn’t start up and threw an error
mysqld: unknown variable 'innodb-file-format=barracuda’.
After checking the logfiles errors pointed at variables that are set for Bench which have been removed in 10.3. After removing those lines, the server starts without any issues.
- Stop Frappe Bench (
- Stop MariaDB Server (Linux:
sudo service.mysql stopor MacOs:
- Open you MariaDB config file (e.g.
sudo vim /usr/local/etc/my.cnf)
- Comment out the 3 innodb variables (innodb-file-format, innodb-file-per-table and innodb-large-prefix) which have been removed in 10.3
[mysqld] # innodb-file-format=barracuda # innodb-file-per-table=1 # innodb-large-prefix=1 character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4
- Update your system (Linux:
sudo apt-get update && sudo apt-get upgradeor MacOS:
brew update && brew upgrade)
- Check if MariaDB server is version 10.3+ (
- Start MariaDB server (Linux:
sudo service.mysql startor MacOs:
- Start and/or update bench (
- The Issue that explains the problem and the solution in more detail: MariaDB 10.3 causing mysqld: unknown variable 'innodb-file-format=barracuda’ · Issue #681 · frappe/bench · GitHub
- MariaDB documentation listing the deleted variables: https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_file_format