MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Mike Peck Date:November 25 2003 10:33am
Subject:Service Shutsdown when not running as LocalSystem
View as plain text  
From: allnight@stripped
To: mysql@stripped
Subject: Service Shutsdown when not running as LocalSystem


 >Description:
    I have installed MySql 4.0.16 on a WinXP laptop.  No matter how I 
install it (default directories or not), the service works fine after 
running 'mysqld --install'.  However, if I then open the services 
control panel and change the LogOn property to some other user, the 
service gets wierd.  I say that, because the service will begin to start 
up after pushing the 'start' button, and things like mysqlshow and 
mysqladmin will work against it.  However, after 30 seconds (which 
happens to be the Service Control Manager timeout), a dialog comes up 
saying the service didn't reconnect in 30 seconds.  At that point, the 
server daemon is down.  If I change the logon use back to the default 
(LocalSystem), the service works fine again.  Using winmysqladmin 
doesn't seem to have any effect on this.  I searched online for a couple 
of hours, and saw nothing about this specific problem.
        
        I created a user "www" in a group "websvcs" that also is who the 
apache2 (successfully runs as.  I altered the file system permissions so 
that www has full control over the install directory (c:\program 
files\mysql) and datadir (c:\www\db) and read access to c:\windows and 
c:\windows\my.ini.  The group websvcs also has the same permissions as 
users to c:\windows\temp.  I tried setting tmpdir under [mysqld] to a 
different directory that www had full control over.

    I also just noticed that even though the zip file I pulled down says 
4.0.16 (and it's the only one I've every put on this box), farther down 
it reports it as 4.0.13.  Maybe there's another reporting problem there.

 >How-To-Repeat:
    Install MySQL 4.0.16 as per instructions, to get a fully working 
installation.  Using the services control panel, change the user the 
services logs on as to another user that is on the box.  I created a 
user called 'www' in a new group called 'websvcs' for this purpose.  
After doing this, I have not been able to get the service to 
successfully start.  (The services control panel will report a startup 
failure, and after that dialog, the mysql server will no longer answer 
requests.
 >Fix:
    

 >Submitter-Id:    <submitter ID>
 >Originator:    Mike Peck
 >Organization:
 Allnight Computing
 >MySQL support: none
 >Synopsis:    Service dies as non LocalSystem user on WinXP
 >Severity:    serious
 >Priority:    low
 >Category:    mysql
 >Class:        sw-bug
 >Release:    mysql-4.0.13 (Source distribution)

 >C compiler:    2.95.3
 >C++ compiler:  2.95.3
 >Environment:
WinBook J4b laptop (P4-2.4GHz, 512MB, 60GB) WinXP Pro, Cygwin, 
Apache2.0.48, ActivePerl5.6.1, php 4.3.4

System: CYGWIN_NT-5.1 WinBook 1.5.5(0.94/3/2) 2003-09-20 16:31 i686 
unknown unknown Cygwin


Some paths:  /usr/bin/perl

Compilation info: CC='gcc'  CFLAGS='-Wimplicit -Wreturn-type -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses 
-Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 
-fno-omit-frame-pointer'  CXX='gcc'  CXXFLAGS='-Wimplicit -Wreturn-type 
-Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 
-fno-omit-frame-pointer'  LDFLAGS=''  ASFLAGS=''
LIBC:
-rwxr-x---+   1 mpeck    Users      761322 Sep 20 13:32 /lib/libc.a
-rwxr-x---+   1 mpeck    Users      761322 Sep 20 13:32 /usr/lib/libc.a
Configure command: ./configure '--prefix=/usr/local/mysql' 
'--enable-assembler' '--with-extra-charsets=complex' 
'--enable-thread-safe-client' '--with-mysqld-ldflags=-all-static' 
'--with-client-ldflags=-all-static' '--enable-local-infile' 
'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W 
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings 
-Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 
'CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W 
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy 
-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti 
-mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc'




Thread
Service Shutsdown when not running as LocalSystemMike Peck25 Nov