Bug #60215 MySQL 5.5.9 Cannot create as a Window Service
Submitted: 23 Feb 2011 6:14 Modified: 20 Aug 2011 21:18
Reporter: Chuong Pham Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:MySQL 5.5.9 OS:Windows (Windows XP SP3)
Assigned to: CPU Architecture:Any
Tags: failed install windows service

[23 Feb 2011 6:14] Chuong Pham
Description:
Cannot create MySQL 5.5.9 as a Windows Service due to this error message: Failed to install the service (Couldn't create service).

Howvever, can start MySQL 5.5.9 in console mode with this command: mysqld --defaults-file=d:/internet/mysql/my.ini --console

How to repeat:
1. Go to http://www.mysql.com/downloads/mysql/ and download Windows 32-bit binary zipped format (mysql-5.5.9-win32.zip).

2. Unpack to a directory called d:\internet\mysql.

3. Configure my.ini file and saved to d:\internet\mysql.

4. Open a DOS prompt and start MySQL 5.5.9 server with one of the following commands:
a) mysqld --install mysql --defaults-file=d:/internet/mysql/my.ini; or
b) mysqld --install mysql

The error message "Failed to install the service (Couldn't create service)" will appear after executing a command from Step 4 above.

Supplement Info
----------------
All tables are created as InnoDB tables and have verified that InnoDB is actively supported.

The configs for my.ini are:

[client]
port=3306

[mysqld]
port=3306
server-id=1
default-storage-engine=InnoDB
character_set_server=utf8
key_buffer_size=256M
max_allowed_packet=1M
table_open_cache=256
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=4M
thread_cache_size=8
query_cache_size=16M
thread_concurrency=8
basedir=d:\\internet\\mysql
innodb_buffer_pool_size=2G
innodb_thread_concurrency=16
innodb_flush_log_at_trx_commit=1
innodb_data_file_path=ibdata1:10M:autoextend
innodb_data_home_dir=d:\\internet\\mysql\\data
innodb_buffer_pool_size=256M
innodb_additional_mem_pool_size=20M
innodb_log_buffer_size=8M
innodb_log_file_size=256M
innodb_log_files_in_group=2
innodb_log_group_home_dir=d:\\internet\\mysql\\data
innodb_lock_wait_timeout=50
innodb_use_sys_malloc=on

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash

[mysqlhotcopy]
interactive-timeout

Suggested fix:
Please investigate MySQL 5.5.9 to see why it cannot be created as a Windows Service (but can run perfectly in console mode).
[23 Feb 2011 6:48] Chuong Pham
Removed the following configs from my.ini file but still can't start MySQL 5.5.9 as a Windows Service:

default-storage-engine=InnoDB
innodb_use_sys_malloc=on
[23 Feb 2011 15:35] MySQL Verification Team
The install process was done with Administrator user privileges?.
[24 Feb 2011 4:30] Chuong Pham
Yes, the install process was performed with Administrator privileges.

What are the dependencies for a MySQL server to start as a Windows service?
[28 Feb 2011 20:00] MySQL Verification Team
Please look for a file which has an extension *.err in the datadir directory and check if exists eventual error message?. Thanks in advance.
[1 Mar 2011 4:21] Chuong Pham
I looked in the datadir directory but the err file's size is zero byte i.e. no message was logged in the err file. And looking in the Windows Event Viewer app shows nothing about MySQL either. It's very strange! I would have expected MySQL to generate at least some errors in the event that it did not function properly. 

Why does MySQL only show this error in the DOS prompt "Failed to install the service (Couldn't create service)" but log nothing else elsewhere?
[7 Mar 2011 4:28] Chuong Pham
Removing "character_set_server=utf8" entry in my.ini seems to work i.e. I'm able to start MySQL as a Windows service now.

I don't know why the entry above would cause MySQL not to start. Can someone in MySQL Support please explain?
[20 Jul 2011 21:18] MySQL Verification Team
I don't have problem with that variable in my.ini file. Anyway please try latest version. Thanks.
[20 Aug 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".