Bug #6625 Configuration Wizard does not quote paths
Submitted: 15 Nov 2004 8:30 Modified: 29 Aug 2005 13:31
Reporter: Tom Metro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:4.1.7 OS:Windows (Windows XP)
Assigned to: Michael G. Zinner CPU Architecture:Any

[15 Nov 2004 8:30] Tom Metro
Description:
The MySQL Server Instance Configuration Wizard on Windows when generating the my.ini file does not place quotations around paths (such as basedir, datadir), resulting in the server failing to start if a "#" is in a path.

How to repeat:
Install server to:
C:\Program Files\# Database\MySQL\Server 4\

Configuration file at:
C:\Program Files\# Database\MySQL\Server 4\my.ini

as generated by the Wizard contains:
basedir=C:/Program Files/# Database/MySQL/Server 4/
datadir=C:/Program Files/# Database/MySQL/Server 4/Data/

Run server:
>"C:\Program Files\# Database\MySQL\Server 4\bin\mysqld-nt" --defaults-file="C:\Program Files\# Database\MySQL\Server 4\my.ini" --console

041115  2:19:38 [ERROR] Can't find messagefile 'C:\Program Files\share\english\errmsg.sys'
041115  2:19:38 [ERROR] Aborting

Suggested fix:
Obviously "#" is used as the comment character in my.ini, and it appears that basedir is being truncated after the "#". Modify the Wizard to place quotations around paths.

Workaround:
Manually edit the config file and place quotations around the path.
[15 Nov 2004 9:56] Tom Metro
I think this can mostly be fixed by editing my-template.ini to incorporate the quotes, though for some path fields, such as:

#*** INNODB Specific options ***
<<{SETINNODBHOMEDIR:[innodb_home]}{:}>>

the parameter and its value appear to be substituted in one step, so there isn't access to place quotes around the value...unless your templating language allows for that.
[6 Jan 2005 23:36] Steven Struzynski
I think something simular is causeing another small issue:
After installing when I run cmd.exe the path is set wrong:
C:\Documents and Settings\Administrator>path
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;
%SystemRoot% should of course be C:\WINNT but for some reason the mysql server instance configuator changed the path value, and %SystemRoot% is not being evaluated.
[9 Jan 2005 6:46] Tom Metro
Steven Struzynski writes:
> After installing...the path is set wrong...

How does it appear when you view the PATH from the control panel (System)? (The SystemRoot variable is expanded when I view it from either location on my NT system.) Is SystemRoot shown when you run set from the command prompt? It could be the registry setting that controls SystemRoot got trashed.

My guess is that this is coincidental, and you only noticed it after installation of MySQL, but more importantly, I don't see the relation to this bug, which is about the Configuration Wizard failing to quote parameters it writes to the configuration file.

I recommend you file a separate bug report so your issue gets the necessarily attention. (Post a follow-up here with the new bug number, and if you respond to any of the above questions, do so in the new bug report.)

 -Tom
[26 Aug 2005 9:50] Michael G. Zinner
Could you check if this is still true for the latest versions?

Thanks,
Mike
[29 Aug 2005 13:31] MySQL Verification Team
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/# Database/MySQL/Server 4/"

#Path to the database root
datadir="C:/Program Files/# Database/MySQL/Server 4/Data/"