Summary:
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.
What happened?
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.
What you need to do before MariaDB 10.3 update:
- Stop Frappe Bench (
bench stop
) - Stop MariaDB Server (Linux:
sudo service.mysql stop
or MacOs:mysql.server stop
) - 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 upgrade
or MacOS:brew update && brew upgrade
) - Check if MariaDB server is version 10.3+ (
mysql -V
) - Start MariaDB server (Linux:
sudo service.mysql start
or MacOs:mysql.server start
) - Start and/or update bench (
bench start
)
More Information:
- 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