Bug #4235 No response after service stop request on Windows XP
Submitted: 21 Jun 2004 17:12 Modified: 21 Jun 2004 18:20
Reporter: Hyun-Chan Kim Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.20a OS:Windows (Windows XP SP1(korean version))
Assigned to: CPU Architecture:Any

[21 Jun 2004 17:12] Hyun-Chan Kim
Description:
Running mysqld.exe as a Windows service using normal non-priviledged user is  ok. But trying to stop service in "service control manager" which could be located via "Control Panel" menu, mysql server stops responding.(Because I'm using korean version of Windows XP, I don't know exact name and menu path for "service control manager" which is my own naming.)

If I starts service using priviledged user, it stops gracefully without any problem.

Here's my configuration.

Installcation path :
  C:\Program Files\mysql
Data path :
  D:\work\mysql\data
Execution file path shown in "service control manager" :
  "C:\Program Files\mysql\bin\mysqld" --defaults-file=d:\work\mysql\mysql.ini MySql
Contents of d:\work\mysql\mysql.ini file :
[mysqld]
basedir=C:/Program Files/mysql/
datadir=D:/WORK/mysql/data/
tmpdir=D:/WORK/mysql/tmp/
bind-address=127.0.0.1
port=3366 # not 3306 but 3366, I changed on purpose

User name of non-priviledge user :
  mysql

It seems that problem is due to file access permission.
File access permissions for non-priviledge user "mysql" are :
Read and Execute on C:\Program Files and subdirectories.
All priviledge including Read, Write and Execute on D:\WORK\mysql and subdirectories.
No priviledges on the remaings.

When I run as a privileged user I have seen two files on D:\ whose file names are form of tXXX and tXXX.1 where XXX is random and have locks on them.
I think the problem is due to above two files.(Because non-priviledged user does not have write access on D:\)
And I can't find any documentation what are those two files.

How to repeat:
Using above configurations, there's no response always whenever trying to stop.

Suggested fix:
Probably, configurable option for location of above two files and documents describing what are those.
[21 Jun 2004 18:20] MySQL Verification Team
The MySQL service is installed under LocalSystem account,
this means that Windows only permits the service stop
for users with that privilege.