Bug #46870 MySQL 5.1.39 (snapshot) does not start on Win7 64 bit
Submitted: 23 Aug 2009 13:42 Modified: 3 Dec 2009 9:25
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.39 snaps, 5.1.41 OS:Windows (Win7 64bit)
Assigned to: CPU Architecture:Any
Tags: qc

[23 Aug 2009 13:42] Peter Laursen
Description:
Dowloaded:http://downloads.mysql.com/snapshots/pb/snapshot-5.1/tree-snapshot-win-x86_64-zip/mysql-5....
from: http://labs.mysql.com/index.php

Followed the description in the the my.ini how to isntall as service.  Windows Service manager accepts the service (named 'mysqlsnap').

But servide wont start.  I tried both:
* renaming the my.medium-ini template to 'my.ini' .. only changed the port not to conflcit
* copying the my.ini used with ny 5.1.37 installation .. changing port, setting basedir and datadir.

cmd.exe ouput (in Danish):

C:\Program Files\MySQL\mysql-snapshot\bin> mysqld --install MySQLsnap --defaults
-file="C:\Program Files\MySQL\mysql-snapshot\my.ini"
Service successfully installed.

C:\Program Files\MySQL\mysql-snapshot\bin>net start mysqlsnap
Tjenesten MySQLsnap starter.
Tjenesten MySQLsnap kunne ikke startes.

Der opstod en systemfejl.

Systemfejlen 1067 opstod.

Processen sluttede uventet.

C:\Program Files\MySQL\mysql-snapshot\bin>net start mysqlsnap
Tjenesten MySQLsnap starter..
Tjenesten MySQLsnap kunne ikke startes.

Der opstod en systemfejl.

Systemfejlen 1067 opstod.

Processen sluttede uventet.

How to repeat:
Hope it is repeatable!
[23 Aug 2009 13:48] Peter Laursen
I tried a few different ports (3309, 3311 and 3320). Still no success.
[23 Aug 2009 15:30] Peter Laursen
this is the latest my.ini I tried

[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3320

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:\Program Files\MySQL\mysql-snapshot\"

#Path to the database root
datadir="C:\Program Files\MySQL\mysql-snapshot\data"

.. etc. (and tried with both type of slashes: \ and / ). And this is the installation path: C:\Program Files\MySQL\mysql-snapshot. I (try to) use the empty datadir shipped with this snapshot (C:\Program Files\MySQL\mysql-snapshot\data) what is there!

error log:

090823 17:10:04 [Warning] Forcing shutdown of 1 plugins
090823 17:10:04 [Note] C:\Program Files\MySQL\mysql-snapshot\bin\mysqld: Shutdown complete

090823 17:10:58 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Error: log file .\ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 56623104 bytes!
090823 17:10:58 [ERROR] Plugin 'InnoDB' init function returned error.
090823 17:10:58 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
C:\Program Files\MySQL\mysql-snapshot\bin\mysqld: Too many arguments (first extra is 'C:\Program Files\MySQL\mysql-snapshot\my.ini').
Use --verbose --help to get a list of available options
090823 17:10:58 [ERROR] Aborting

.. maybe a duplicate of the issue reported by Sheeri lately, that InnoDB plugin is not there?
[24 Aug 2009 6:03] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Dupliate of bug #46794
[24 Aug 2009 7:44] Peter Laursen
I did not relaize that it could be a duplicate when I first posted. Of course not!
[13 Sep 2009 10:49] Peter Laursen
I am opening again.  It is not a duplicate.  Issue is also reproducible with 5.1.40 shapshot.

This works:
C:\Program Files\MySQL\mysql-snapshot\bin>mysqld --defaults-file="c:\my.ini"

But this doesn't (sorry .. it is Danish)
C:\Program Files\MySQL\mysql-snapshot\bin>mysqld --install mysqlsnap --defaults-
file="c:\my.ini"
Service successfully installed.

C:\Program Files\MySQL\mysql-snapshot\bin>net start mysqlsnap
Tjenesten mysqlsnap starter..
Tjenesten mysqlsnap kunne ikke startes.

Der opstod en systemfejl.

Systemfejlen 1067 opstod.

Processen sluttede uventet.

C:\Program Files\MySQL\mysql-snapshot\bin>

error log for start attempt as a service: 

090913 11:37:28 [Note] Plugin 'FEDERATED' is disabled.
C:\Program Files\MySQL\mysql-snapshot\bin\mysqld: Too many arguments (first extra is
'c:\my.ini').
Use --verbose --help to get a list of available options
090913 11:37:29 [ERROR] Aborting

090913 11:37:30 [Warning] Forcing shutdown of 1 plugins
090913 11:37:30 [Note] C:\Program Files\MySQL\mysql-snapshot\bin\mysqld: Shutdown complete

When starting as a service Windows service manager sends the error "Too many arguments (first extra is 'c:\my.ini').".  Looks like the server binary duplicates that parameter.

(I used 'c:\my.ini' in the example to avoid confusion due to UAC on (what I need for another task running)
[24 Sep 2009 7:07] Valeriy Kravchuk
I think this is a duplicate of bug #46917 actually. Check the registry entry for the service.
[24 Sep 2009 18:55] Peter Laursen
mysql 3.1.40 snapshot regkey
===============================

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mysqlsnap] exported and opened in Notepad:

"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\
  6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,4d,00,79,00,53,00,51,00,4c,\
  00,5c,00,6d,00,79,00,73,00,71,00,6c,00,2d,00,73,00,6e,00,61,00,70,00,73,00,\
  68,00,6f,00,74,00,5c,00,62,00,69,00,6e,00,5c,00,6d,00,79,00,73,00,71,00,6c,\
  00,64,00,22,00,20,00,63,00,3a,00,5c,00,6d,00,79,00,2e,00,69,00,6e,00,69,00,\
  20,00,6d,00,79,00,73,00,71,00,6c,00,73,00,6e,00,61,00,70,00,00,00
"DisplayName"="mysqlsnap"
"ObjectName"="LocalSystem"

imagepath value as text:
"C:\Program Files\MySQL\mysql-snapshot\bin\mysqld" c:\my.ini mysqlsnap

MySQL 5.1.39 (released) installed using installer
==================================================

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MySQL51] exported and opened in Notepad:

"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\
  6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,4d,00,79,00,53,00,51,00,4c,\
  00,5c,00,4d,00,79,00,53,00,51,00,4c,00,20,00,53,00,65,00,72,00,76,00,65,00,\
  72,00,20,00,35,00,2e,00,31,00,5c,00,62,00,69,00,6e,00,5c,00,6d,00,79,00,73,\
  00,71,00,6c,00,64,00,22,00,20,00,2d,00,2d,00,64,00,65,00,66,00,61,00,75,00,\
  6c,00,74,00,73,00,2d,00,66,00,69,00,6c,00,65,00,3d,00,22,00,43,00,3a,00,5c,\
  00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,\
  73,00,5c,00,4d,00,79,00,53,00,51,00,4c,00,5c,00,4d,00,79,00,53,00,51,00,4c,\
  00,20,00,53,00,65,00,72,00,76,00,65,00,72,00,20,00,35,00,2e,00,31,00,5c,00,\
  6d,00,79,00,2e,00,69,00,6e,00,69,00,22,00,20,00,4d,00,79,00,53,00,51,00,4c,\
  00,35,00,31,00,00,00
"DisplayName"="MySQL51"
"WOW64"=dword:00000001
"ObjectName"="LocalSystem"

Image path value as text: 
"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" MySQL51

.. so yes "--defaults-file" spec is missing for my.ini for 5.1.40 snapshot service installed with "mysqld --install..." compared with 5.1.39 installed with installer. But also a "WOW64" line is missing compared with 5.1.39 installed with installer. Not sure, but does it mean that the service is not identified as a 64 bit program by Windows?
[20 Oct 2009 9:44] Peter Laursen
not fixed in mysql-5.1.41-snapshot20091016-win-x86_64
[27 Nov 2009 9:19] Valeriy Kravchuk
Please, check if this still happens with official 5.1.41 released.
[27 Nov 2009 20:31] Peter Laursen
@Valeriuy: does it work for you? Or can anybody else in MySQL organisation confirm that this should be fixed now? And if it fixed in 5.1.41 GA has the fix been merged into the code tree from where snapshots are build (so that future snapshosts can be tested on Windows)?

Why ask users to do the testing that people on MySQL payroll should do? I would be happy to verify once a MySQL employee has confirmed the fix for himself - but not before that. After all downloads etc. will take me some time.

Sorry - but this is sent back to MySQL! Verification of a bugfix is basically not my job!
[28 Nov 2009 10:54] Peter Laursen
ok .. today is not so tense as yesterday so I can afford the time.

I use the download mysql-noinstall-5.1.41-winx64.zip. 
I unzip it. Make a copy of it named mytest, copy to c:\
I make a copy of the file my-medium.ini and rename to my.ini
Start cmd.exe as administrator.

C:\Windows\system32>c:\mytest\bin\mysqld --install mysqltest --defaults-file="c:
\mytest\my.ini"
Service successfully installed.

C:\Windows\system32>net start mysqltest
Tjenesten mysqltest starter.
Tjenesten mysqltest kunne ikke startes.

Der opstod en systemfejl.

Systemfejlen 1067 opstod.

Processen sluttede uventet.

registry key/Image Path filed reads:
c:\mytest\bin\mysqld --defaults-file=c:\mytest\my.ini mysqltest

I note that other functional MySQL services have "quoted" file paths, ie: 
"c:\mytest\bin\mysqld" --defaults-file="c:\mytest\my.ini" mysqltest
(quotes always need to be if there are SPACES in file path - and it seems that COLON requires same here). After editing the key (adding the "quotes" and restarting OS the service start.

In conclusion I find: "mysqld --install" should surround file paths with "double quotes". 

So "fix one bug - get another one free", I think is the situation here. Did this ever work for anybody?  Was it ever tried?
[28 Nov 2009 13:22] Peter Laursen
and with mysql-5.1.42-snapshot20091118-win-x86_64 the situation is exactly the same as 4.0.41 GA.
[28 Nov 2009 13:32] Peter Laursen
correction:
and with mysql-5.1.42-snapshot20091118-win-x86_64 the situation is
exactly the same as 5.1.41 GA
[1 Dec 2009 11:17] Tonci Grgin
Peter, don't really know what's wrong in your environment but, for me, things work as expected:

C:\Users\tonci\Downloads\mysql-5.1.41-winx64\bin>mysqld.exe --install MySQL51 --
defaults-file=C:\Users\tonci\Downloads\mysql-5.1.41-winx64\my.ini
Service successfully installed.

C:\Users\tonci\Downloads\mysql-5.1.41-winx64\bin>net start MySQL51
The MySQL51 service is starting.
The MySQL51 service was started successfully.

C:\Users\tonci\Downloads\mysql-5.1.41-winx64\bin>

Environment: *Administrator* console (x64 one) on Win7 Ultimate x64 running in VBox. MySQL-noinstall-5.1.41-winx64.zip was used. my-medium.ini with changed port number.
[3 Dec 2009 9:25] Peter Laursen
hmmm .. 

but please still consider if I install to a path with SPACE or have configuration in such ("c:\my folder"). Does this require "quoted" file paths?
[4 Oct 2012 7:41] Marko Mäkelä
For what it is worth, the log file size problem is Bug#13494.
I did not carefully read all comments in this bug, so I am not saying that this bug necessarily is a duplicate of Bug#13494. I guess that InnoDB could also be looking for the files from the wrong directory where files of different size existed.