Open
Description
The latest version of Percona Server 8.0 (8.0.36-28) blows away the /etc/mysql/my.cnf
file without asking. This makes it unsafe to use /etc/mysql/my.cnf
for configuration.
# If the existing config file is a proper file, we back it up
if [ -f "/etc/mysql/my.cnf" ] && [ ! -L "/etc/mysql/my.cnf" ]; then
cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak
echo "WARNING: /etc/mysql/my.cnf moved to /etc/mysql/my.cnf.bak"
echo "Please use etc/mysql/mysql.conf.d for any custom configuration settings"
fi
update-alternatives --force --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 300
This role should switch to using /etc/mysql/mysql.conf.d/ansible.cnf
for configuration instead of /etc/mysql/my.cnf
. Otherwise the percona-server-server package will overwrite the my.cnf file, erasing all of the configuration from this role and causing a very unpleasant disruption for most people using this role.