Configuring MariaDB server
You can custom configure the MariaDB database by configuring the MariaDB server with the option files. The default MariaDB option file is called my.cnf on Unix-like operating systems.
- SSH into the database server host as a root user.
-
Open the
my.cnffile for editing in an editor such as vi or nano:On RHEL/CentOS/SLES:vi /etc/my.cnfOn Debian/Ubuntu:vi /etc/mysql/my.cnf -
Ensure that the
bind-addressproperty is set to0.0.0.0or is commented out in case of a default value.bind-address=0.0.0.0 -
Ensure that the
default-storage-engineproperty is set toinnodb.[mysqld] default-storage-engine=innodb -
Ensure that the
sql_modeproperty is set toSTRICT_ALL_TABLESto avoid columns being truncated during migration.sql_mode=STRICT_ALL_TABLES - Save the file and exit.
- Restart the database server.
-
Enable the database server to automatically start on system boot:
On RHEL/CentOS:
sudo systemctl enable mariadbOn SLES:sudo systemctl enable mariadbOn Ubuntu, MariaDB starts automatically after installation. Run the following command to check the status:sudo systemctl status mariadbOn Debian, MariaDB starts automatically after installation. Run the following command to check the status:sudo systemctl status mariadb
