Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
11.1.1
-
11.1.1-MariaDB-log MariaDB Server
NAME="Rocky Linux"
VERSION="8.10 (Green Obsidian)"
Description
Description:
Users are confused by the undocumented interaction of `log-basename` with other log file definition variables.
Reproduction:
sudo su
|
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash -s -- --mariadb-server-version=mariadb-11.1.1 |
yum install MariaDB-server
|
systemctl start mariadb
|
echo "
|
|
[mariadb]
|
log_slow_query_time = 1 |
log_slow_query = 1 |
log_slow_query_file = /var/log/mariadb/slow-queries.log" >> /etc/my.cnf.d/server.cnf
|
|
mkdir /var/log/mariadb
|
chown mysql:mysql /var/log/mariadb
|
systemctl restart mariadb
|
# works as expected
|
mariadb -e "SELECT SLEEP(5);" |
cat /var/log/mariadb/slow-queries.log
|
|
# does not work as expected. /var/log/mariadb/slow-queries.log isnt used anymore now
|
echo "log-basename=any-prefix" >> /etc/my.cnf.d/server.cnf |
systemctl restart mariadb
|
mariadb -e "SELECT SLEEP(4);" |
cat /var/log/mariadb/slow-queries.log
|
# instead its using /var/lib/mysql/any-prefix-slow.log
|
cat /var/lib/mysql/any-prefix-slow.log
|
Workaround:
set log-basename before slow_query_log_file or log_slow_query_file
Example:
[mariadb]
|
log-basename=any-prefix
|
log_slow_query_time = 1 |
slow_query_log = 1 |
slow_query_log_file = /var/log/mariadb/slow-queries.log
|
Attachments
Issue Links
- relates to
-
MDEV-29096 log_error ignored in my.cnf file if log_basename set
- Open