frappe.exceptions.ImproperDBConfigurationError: MariaDb is not properly configured

My machine OS
Ubuntu 18.04.4 LTS

MariaDB Version
mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

configuration file
/etc/mysql/my.cnf

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
# [client-server] 
[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
 #Import all .cnf files from configuration directory
 !includedir /etc/mysql/conf.d/
 !includedir /etc/mysql/mariadb.conf.d/

and restarted even i reboot the machine and i have this issue after i run

bench new-site testsite

MySQL root password:
================================================================================
Creation of your site - testsite failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB’s my.cnf, restart MariaDB then
run bench new-site testsite again.

[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

================================================================================
Traceback (most recent call last):
File “/opt/pharma/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py”, line 65, in _new_site
admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/opt/pharma/erpnext/frappe-bench/apps/frappe/frappe/installer.py”, line 43, in install_db
check_if_ready_for_barracuda()
File “/opt/pharma/erpnext/frappe-bench/apps/frappe/frappe/installer.py”, line 367, in check_if_ready_for_barracuda
“collation_server”: “utf8mb4_unicode_ci”
File “/opt/pharma/erpnext/frappe-bench/apps/frappe/frappe/installer.py”, line 386, in check_database
reason=“MariaDB default file format is not Barracuda”
frappe.exceptions.ImproperDBConfigurationError: MariaDb is not properly configured

Hi,

Welcome to the community!


I’m reviewing the code in the frappe app (version-12 branch) and I couldn’t find an instance where frappe.exceptions.ImproperDBConfigurationError is being raised.

Following should resolve the issue:

  • Update mariaDB to v10.3+ (important: see instructions)
  • Update frappe + erpnext to the latest version.
1 Like