6 messages in com.mysql.lists.win32Custom Service not working - 3.23.55/...
FromSent OnAttachments
Troy Engel19 Mar 2003 15:56 
miguel solórzano20 Mar 2003 05:16 
Troy Engel20 Mar 2003 09:46 
Troy Engel24 Mar 2003 09:52 
miguel solórzano25 Mar 2003 10:26 
Troy Engel25 Mar 2003 14:22 
Subject:Custom Service not working - 3.23.55/Win2k
From:Troy Engel (ten@fluid.com)
Date:03/19/2003 03:56:37 PM
List:com.mysql.lists.win32

I'm creating a custom installer for a client (they've licensed MySql, etc) and need to install the mysqld-nt service under a different name than "MySql". I'm not new to installations or services, or even the win32api CreateService().

Problem: "mysqld-nt --install MyFoo" creates the service, but it fails to work. Even trying to add "--defaults-file=" fails.

Steps: clean Win2k Pro machine (clean, very clean)

1) make a dir like "c:\mybuild". Copy all mysql files into this dir, so you have now c:\mybuild\mysql\.

2) copy my-small.cnf to c:\my.cnf, edit to add: [mysqld] basedir=c:/mybuild/mysql/ datadir=c:/mybuild/mysql/data/

3) open a cmd prompt, change to mysql\bin, run mysqld-nt --install MyFoo.

4) attempt to start the service and it will fail with an error

If you now --remove MyFoo, and simply run mysqld-nt --install, it all works as planned. I have fought this for 3 days, as I need A) a new name, and B) to put --defaults-file=c:/something/my.cnf. I've tried every hack I could think of and can't get anything but a default "--install" to work (even tried reading the C source).

Sample of a direct run in a cmd.exe:

C:\mybuild\mysql\bin>mysqld-nt --install MyFoo Service successfully installed.

C:\mybuild\mysql\bin>net start MyFoo The MyFoo service is starting. The MyFoo service could not be started.

A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly.

C:\mybuild\mysql\bin>mysqld-nt --remove MyFoo Service successfully removed.

C:\mybuild\mysql\bin>mysqld-nt --install Service successfully installed.

C:\mybuild\mysql\bin>net start MySql The MySql service is starting. The MySql service was started successfully.

Has anyone at all gotten this thing to work with any service parameters other than the defaults? Even trying to use CreateService() by hand and put what I want into the system fails miserably, MySQL fails to start up. Any help would be great.

frustrated, -te