Bug #30084 Installation script runs mysql_install_db unconditionally
Submitted: 26 Jul 2007 19:10 Modified: 30 Jul 2007 20:06
Reporter: Valeriy Kravchuk Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.0.42, 5.0.44, 5.0.46 OS:Other (IBM i5OS)
Assigned to: Kent Boortz CPU Architecture:Any

[26 Jul 2007 19:10] Valeriy Kravchuk
Install script for MySQL on IBM i5OS in current *SAVF binaries unconditionally executes mysql_install_db script. This will obviously lead to data loss if user will try to install new version over existing one, with some users/grants etc. added already.

How to repeat:
Look at the source code of insmysql program.

Suggested fix:
Check if mysql database already exists at some (default?) location and ask user if he wants to upgrade or re-install completely. Run mysql_upgrade instead of mysql_install_db in case of upgrade with some changes in mysql database already in place.
[27 Jul 2007 9:22] Daniel Fischer
As far as I can tell, this is fixed with the latest patch from IBM.
[29 Jul 2007 22:12] Kent Boortz
This was corrected by changes in the install script,
and repackaging the SAVF packages (TAR packages were
never affected). Corrected in the already released

[30 Jul 2007 20:06] Paul Dubois
Noted in 5.0.42, 5.0.44, 5.0.45, 5.0.46 changelog entries.