Skip to content

Commit

Permalink
Improved MariaDB configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
NorNet Praesum Presum committed Dec 5, 2024
1 parent 581212c commit 47b507a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/SQL/mariadb-database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@

DROP DATABASE IF EXISTS ${DATABASE};
CREATE DATABASE ${DATABASE};

-- Ensure that the server accepts large data blocks from the importer.
-- The default of 16 MiB is too small, setting 1 GiB instead:
SET GLOBAL max_allowed_packet=1073741824;
4 changes: 2 additions & 2 deletions src/TestDB/1-install-database
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ EOF
sudo service mariadb restart
elif [ "${ID}" == "fedora" ] ; then
sudo sed \
-e "s%^#bind-address[ \t]*=.*%bind-address = *\nssl-ca = ${MARIADB_CA_FILE}\nssl-crl = ${MARIADB_CRL_FILE}\nssl-cert = ${MARIADB_CRT_FILE}\nssl-key = ${MARIADB_KEY_FILE}\nrequire-secure-transport = on\ntls_version = TLSv1.3%g" \
-e "s%^#bind-address[ \t]*=.*%max_allowed_packet = 1G\nbind-address = *\nssl-ca = ${MARIADB_CA_FILE}\nssl-crl = ${MARIADB_CRL_FILE}\nssl-cert = ${MARIADB_CRT_FILE}\nssl-key = ${MARIADB_KEY_FILE}\nrequire-secure-transport = on\ntls_version = TLSv1.3%g" \
/etc/my.cnf.d/mariadb-server.cnf | sudo tee /etc/my.cnf.d/mariadb-server.cnf.new && \
sudo diff --color /etc/my.cnf.d/mariadb-server.cnf /etc/my.cnf.d/mariadb-server.cnf.new || true && \
sudo mv /etc/my.cnf.d/mariadb-server.cnf.new /etc/my.cnf.d/mariadb-server.cnf
sudo service mariadb restart
elif [ "${ID}" == "freebsd" ] ; then
sudo sed \
-e "s%^bind-address[ \t]*=.*%bind-address = *\nssl-ca = ${MARIADB_CA_FILE}\nssl-crl = ${MARIADB_CRL_FILE}\nssl-cert = ${MARIADB_CRT_FILE}\nssl-key = ${MARIADB_KEY_FILE}\nrequire-secure-transport = on\ntls_version = TLSv1.3%g" \
-e "s%^bind-address[ \t]*=.*%max_allowed_packet = 1G\nbind-address = *\nssl-ca = ${MARIADB_CA_FILE}\nssl-crl = ${MARIADB_CRL_FILE}\nssl-cert = ${MARIADB_CRT_FILE}\nssl-key = ${MARIADB_KEY_FILE}\nrequire-secure-transport = on\ntls_version = TLSv1.3%g" \
/usr/local/etc/mysql/conf.d/server.cnf | sudo tee /usr/local/etc/mysql/conf.d/server.cnf.new && \
sudo diff --color /usr/local/etc/mysql/conf.d/server.cnf /usr/local/etc/mysql/conf.d/server.cnf.new || true && \
sudo mv /usr/local/etc/mysql/conf.d/server.cnf.new /usr/local/etc/mysql/conf.d/server.cnf
Expand Down

0 comments on commit 47b507a

Please sign in to comment.