Bug #35105 mysql_install_db refers to incorrect script locations on Windows
Submitted: 6 Mar 2008 12:49 Modified: 15 May 2013 21:49
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0.58 OS:Windows
Assigned to: Kent Boortz CPU Architecture:Any

[6 Mar 2008 12:49] Philip Stoev
Description:
Running mysql_install_db on Windows produces the following output:

"Alternatively you can run:

  c:\bin\5.0.58/bin/mysql_secure_installation"

However mysql_secure_installation is a script, not a binary and is located in /scripts and called "mysql_secure_installation.pl".

Furthermore, the output says:

"You can start the MySQL daemon with:

  cd C:/Program Files/MySql/MySQL Server 5.0 ; c:\bin\5.0.58/bin/mysqld_safe &"

The path "C:/Program Files/MySql/MySQL Server 5.0" is hard-coded in this statement, even though it may be invalid, because the user has Program Files in another drive ,or because he started the mysql_install_db script with a specific directory for --basedir.

The value "C:/Program Files" is hardcoded in many other places within the script.

How to repeat:
Run perl mysql_install_db.pl --basedir=c:\bin\5.0.58 --force

Suggested fix:
Do not assume that "C:/Program Files" is the correct name for the program files directory of a Windows installation.
[19 Mar 2008 11:19] Philip Stoev
This bug is a property of our windows packages, not a property of the code or the BitKeeper tree.

mysql_install_db.pl is generated from mysql_install_db.pl.in, and during that generation process, which appears to take place on the build machine, the hard-coded paths are placed into the script. Unfortunately, even if those hard coded paths are correct for UNIX (which has a unified directory structure), they will not appply for Windows, where both the drive and the program files directory are configurable.

If we are unable to determine the correct installation path so that this script provides the correct output for the client system, then we should at least make a note that c:\program files is just an example and varies by system.
[11 May 2008 3:32] MySQL Verification Team
Thank you for the bug report.
[29 Sep 2010 11:15] Jonathan Perkin
We should probably just remove mysql_install_db.pl, Kent?
[26 Nov 2012 17:17] gull faraz
nice work i like it http://www.readenews.com/2012/11/instagram-launches-profile-badges.html
[15 May 2013 21:49] Yngve Svendsen
Obsolete Server version, and mysql_install_db is not supported on Windows and scheduled for removal from our Windows packages.