Percona Server dosent read config

hey there,

I installed the percona-server-server package on Ubuntu 24. I first tried to set the config file before installing the package by using debconf setting the value for percona-server-server/data-dir to /etc/mysql/my.cnf

But after templating the following things into the file I recognized using pt-config-diff that my values arent recognized!

#
# KEEP YOUR PAWS OFF! THIS FILE IS MANAGED BY ANSIBLE! ANY CHANGES WILL BE OVERWRITTEN! COMMIT CHANGES TO https://bitbucket.org/customer/ansible
#
# You can easily add new config options to the dictionary,
# they will all be rendered (but not checked!). Make sure the options are correct

[mysqld]
basedir = /usr
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
datadir = /var/lib/mysql
default-storage-engine = InnoDB
expire_logs_days = 7
innodb_buffer_pool_instances = 4
innodb_buffer_pool_size = 2G
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
innodb_open_files = 4000
join_buffer_size = 2M
log-error = /var/log/mysql/error.log
max_connections = 150
max_heap_table_size = 64M
pid-file = /var/run/mysqld/mysqld.pid
read_buffer_size = 2M
read_rnd_buffer_size = 4M
socket = /var/run/mysqld/mysqld.sock
sort_buffer_size = 2M
sync_binlog = 1
table_open_cache = 2000
tmp_table_size = 64M
tmpdir = /tmp
user = mysql
[22:40:15] root@customer-ansible: /etc/mysql # pt-config-diff localhost /etc/mysql/my.cnf
16 config differences
Variable                  customer-ansible      /etc/mysql/mysql.conf.d/ow
========================= ========================= =========================
collation_server          utf8mb4_0900_ai_ci        utf8mb4_unicode_ci
expire_logs_days          0                         7
innodb_buffer_pool_ins... 1                         4
innodb_buffer_pool_size   134217728                 2147483648
innodb_flush_method       fsync                     O_DIRECT
innodb_log_file_size      50331648                  268435456
join_buffer_size          262144                    2097152
log_error                 stderr                    /var/log/mysql/error.log
max_connections           151                       150
max_heap_table_size       16777216                  67108864
pid_file                  /var/lib/mysql/medizin... /var/run/mysqld/mysqld...
read_buffer_size          131072                    2097152
read_rnd_buffer_size      262144                    4194304
sort_buffer_size          262144                    2097152
table_open_cache          4000                      2000
tmp_table_size            16777216                  67108864

I also tried using a seperate override file in /etc/mysql/mysql.conf.d/own.cnf but this also dosent have an effect after stopping and starting mysql. What am I doing wrong?

best, pscloud

Check /etc/my.cnf and other .cnf files for possible conflicts of @include which might have paths that you are not using.

I checked all the files and dirs. /etc/my.cnf does not exist, so according to the output of mysql --help --verbose the next one is /etc/mysql/my.cnf

This file says:

#
# The Percona Server 8.0 configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

Even when I replace this file with the content or I put my own file under one of these dirs, mysql doesent use my config options.

Check the value of update-alternatives for my.cnf There might be a hidden override. I’m not well versed in this tool, so you’ll have to do some google-foo.

I checked it before I wrote and double checked it now. When I put my config in these files it isnt recognized by mysql as well…

[21:00:57] root@customer-ansible: ~ # update-alternatives --list my.cnf
/etc/mysql/my.cnf.fallback
/etc/mysql/mysql.cnf

run mysqld --help --verbose and it should tell you if it was able to parse the file and show you, at the bottom, any parameters that were changed as a result of the file parsing. Or, might show an error if it cannot read them.

Couldn’t find that part telling if its able to read the config file. Thats the output, variables and startup options are cut out.

[21:05:45] root@customer-ansible: ~ # mysqld --help --verbose
mysqld  Ver 8.0.37-29 for Linux on aarch64 (Percona Server (GPL), Release '29', Revision '30dc4e71')
BuildID[sha1]=2044d59fc805795fa10146592a6a19e3f9b12e68
Copyright (c) 2009-2024 Percona LLC and/or its affiliates
Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Starts the MySQL database server.

Usage: mysqld [OPTIONS]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql_cluster mysqld server mysqld-8.0

[...]

To see what values a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.

When I look at the order I’m confused that its not loaded. Theres no /etc/my.cnf so it must load /etc/mysql/my.cnf but it dosent. I double checked with writing some weird nonesense in the config file, but mysql starts without complaining. So I think it dosen’r recognize this file…

When I use /etc/my.cnf now it uses the config. But I can’t see why its not using /etc/mysql/my.cnf when the first one isnt available

Could you please try without using debcon to set values as for me it worked well

I’m sorry, I haven’t had time to work on this the last two weeks. I tried it on a fresh, manually installed server - and surprise, same problem :frowning: