setup_inigo configures mysql8 cnf correctly
@@ -172,24 +172,27 @@ setup_database() {
if [ "${SQL_FLAVOR}" = "mysql" ] || [ "${SQL_FLAVOR}" = "mysql8" ]; then
source ${GOPATH_ROOT}/scripts/ci/initialize_mysql.sh
- server_cnf_path="/etc/mysql/mariadb.conf.d/50-server.cnf"
+ chown mysql:mysql "$ca_file"
+ chown mysql:mysql "$cert_file"
+ chown mysql:mysql "$key_file"
+
if [ "${SQL_FLAVOR}" = "mysql8" ]; then
server_cnf_path="/etc/mysql/mysql.conf.d/mysqld.cnf"
- fi
- sed -i 's/#max_connections.*= 100/max_connections = 2000/g' "${server_cnf_path}"
+ sed -i 's/# max_connections.*= 151/max_connections = 2000/g' "${server_cnf_path}"
+ echo "ssl-cert = $cert_file" >> "${server_cnf_path}"
+ echo "ssl-key = $key_file" >> "${server_cnf_path}"
+ echo "ssl-ca = $ca_file" >> "${server_cnf_path}"
- chown mysql:mysql "$ca_file"
- chown mysql:mysql "$cert_file"
- chown mysql:mysql "$key_file"
+ initialize_mysql8
+ else
+ server_cnf_path="/etc/mysql/mariadb.conf.d/50-server.cnf"
+ sed -i 's/#max_connections.*= 100/max_connections = 2000/g' "${server_cnf_path}"
sed -i "s%#ssl-cert = /etc/mysql/server-cert.pem%ssl-cert = $cert_file%g" "${server_cnf_path}"
sed -i "s%#ssl-key = /etc/mysql/server-key.pem%ssl-key = $key_file%g" "${server_cnf_path}"
sed -i "s%#ssl-ca = /etc/mysql/cacert.pem%ssl-ca = $ca_file%g" "${server_cnf_path}"
- if [ "${SQL_FLAVOR}" = "mysql8" ]; then
- initialize_mysql8
- else
initialize_mysql
fi
else
