diff --git a/mysql/tests/compose/mariadb.conf b/mysql/tests/compose/mariadb.conf index b4349d96e5255..52f9ed5717618 100644 --- a/mysql/tests/compose/mariadb.conf +++ b/mysql/tests/compose/mariadb.conf @@ -1,8 +1,11 @@ [mysqld] +# Activate all logs (general and slow query logs aren't enabled by default), +# and locate them all under the same folder so we can easily share them +# with the Agent container. +general_log = on +general_log_file = /opt/bitnami/mariadb/logs/mysql.log +log_error = /opt/bitnami/mariadb/logs/mysql_error.log +slow_query_log = on +slow_query_log_file = /opt/bitnami/mariadb/logs/mysql_slow.log +long_query_time = 0.1 # Facilitates local slow query log testing. # log_short_format=ON # Uncomment to simulate short log format. - -# Slow logs aren't enabled by default, so we enable and configure them here -# to save us some manual configuration when developing. -slow_query_log = 1 -slow_query_log_file = /opt/bitnami/mariadb/logs/slow.log -long_query_time = 0.1 diff --git a/mysql/tests/compose/mariadb.yaml b/mysql/tests/compose/mariadb.yaml index e57e52ae93a43..c73bce1af2dcf 100644 --- a/mysql/tests/compose/mariadb.yaml +++ b/mysql/tests/compose/mariadb.yaml @@ -14,7 +14,7 @@ services: ports: - "${MYSQL_PORT}:3306" volumes: - - ${MYSQL_CONF_PATH}:/bitnami/mariadb/conf/my_custom.cnf:ro + - ${MYSQL_CONF_PATH}:/opt/bitnami/mariadb/conf/my_custom.cnf:ro mysql-slave: container_name: mysql-slave diff --git a/mysql/tests/compose/mysql.conf b/mysql/tests/compose/mysql.conf index b03a8dbfc7651..9ede0d4a60201 100644 --- a/mysql/tests/compose/mysql.conf +++ b/mysql/tests/compose/mysql.conf @@ -1,8 +1,16 @@ [mysqld] +# Activate all logs (general and slow query logs aren't enabled by default), +# and locate them all under a shared folder so we can easily share them +# with the Agent container. +general_log = on +general_log_file = /var/log/mysql/mysql.log +log_error = /var/log/mysql/mysql_error.log +slow_query_log = on +slow_query_log_file = /var/log/mysql/mysql_slow.log +long_query_time = 0.1 # Facilitates local slow query log testing. # log_short_format=ON # Uncomment to simulate short log format. -# Slow logs aren't enabled by default, so we enable and configure them here -# to save us some manual configuration when developing. -slow_query_log = 1 -slow_query_log_file = /var/log/mysql/slow.log -long_query_time = 0.1 +[mysqld-8.0] +general_log_file = /opt/bitnami/mysql/logs/mysql.log +log_error = /opt/bitnami/mysql/logs/mysql_error.log +slow_query_log_file = /opt/bitnami/mysql/logs/mysql_slow.log diff --git a/mysql/tests/compose/mysql8.yaml b/mysql/tests/compose/mysql8.yaml index 7957a0a7a785e..abcc0ea7fbcfe 100644 --- a/mysql/tests/compose/mysql8.yaml +++ b/mysql/tests/compose/mysql8.yaml @@ -13,6 +13,8 @@ services: - MYSQL_DATABASE=my_database ports: - "${MYSQL_PORT}:3306" + volumes: + - ${MYSQL_CONF_PATH}:/opt/bitnami/mysql/conf/my_custom.cnf:ro mysql-slave: container_name: mysql-slave