Bug #82639 5.7 Apt get install automatically overwrites old cnf
Submitted: 18 Aug 2016 18:25 Modified: 3 Jun 2021 18:53
Reporter: Erick Franco Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.7.14 OS:Ubuntu (14.0.4)
Assigned to: Lars Tangvald CPU Architecture:Any

[18 Aug 2016 18:25] Erick Franco
Description:
When installing 5.7 through apt-get, it no longer asks you what to do with the configuration file, and automatically decides to overwrite the existing cnf. It also ignores the dpkg options "force-confold" and "force-confdef".

How to repeat:
* New server with ubuntu installed.
* Create your custom my.cnf in /etc/mysql/
* Configure apt using the apt-config package, selecting 5.7 as the version to install
* Run "apt-get install mysql-server"
* Old my.cnf gets renamed to my.cnf.bak and a new one is installed with default values

Suggested fix:
Prompt the user on what to do when it detects a current my.cnf file
[19 Aug 2016 5:12] Lars Tangvald
The current solution was chosen to fix problems with upgrading from different versions and variants, but it should be done better so it doesn't subvert user configurations.
[30 Nov 2016 2:06] Javier Rivera Zavala
Posted by developer:
 
This is working as designed. What can be done is promoting the issue to an enhancement request.
[3 Jun 2021 18:53] Paul DuBois
Posted by developer:
 
Fixed in 8.0.26.

For upgrades on Ubuntu, if an existing my.cnf file is found, it is
renamed to my.cnf.bak and a warning is issued.