Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

MySQL 5.1 service can start under Local System account or Administrator User account.
But MySQL 5.1 service cannot start under normal user account.

It gives:

Error 1067:The process terminated unexpectedly.

What could be the issue?

share|improve this question
add comment

3 Answers

The most important thing is giving security permissions to normal user on MySQL Data folder.
Here is another simple way to solve the problem.

  1. Create a new user group. eg. MySQL_Admins
  2. Create a new user. eg. Mysql_user
  3. Add Mysql_user under MySQL_Admins group.
  4. Add following security permissions to MySQL_Admins on MySQL Data folder (you can find it in my.ini file)
    Windows XP
    datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/data"

    Windows Server 2008
    datadir="C:/ProgramData/MySQL/MySQL Server 5.1/data"

    a. Read & execute
    b. List folder contents
    c. Read
    d. Write

  5. Chage Log On as properties for MySQL Service to Mysql_user.
    MySQL Service > Properties > Log On > This account > Select Mysql_user

  6. Start MySQL Service

share|improve this answer
add comment

First step will be to check the permissions: Does the user you want to run MySQL have all the necessary access rights?

share|improve this answer
    
Which are "run as service". –  mailq Dec 28 '11 at 21:32
add comment

To startMySQL service under normal user account, user must have permission to start that service. User should be at least Standard User. Restricted user doesn't have sufficient permission to start service.

I can solve doing following steps:

  1. Create a new user group. eg. MySQL_Admins

  2. Create a new user. eg. Mysql_user

  3. Add Mysql_user under MySQL_Admins group.

  4. Edit registry key permission a. Give 'Full Control' Permission to MySQL_Admins Group for HKLM\SYSTEM\CurrentControlSet\Services\MySQL

    b. Give 'Full Control' Permission to MySQL_Admins Group for HKLM\SYSTEM\CurrentControlSet\Services

    c. Give 'Full Control' Permission to MySQL_Admins Group for HKLM\SOFTWARE\MySQL AB

  5. Add following file security permission to MySQL_Admins Group on C:\Program Files\MySQL\MySQL Server 5.1(MySQL Installation Path)
    a. Read & execute
    b. List folder contents
    c. Read

  6. Add Full control security permission to MySQL_Admins Group on MySQL Data Directory (You can find in my.ini file)
    Windows XP
    datadir="C:/Documents and Settings/All Users/Application Data/MySQL/"

    Windows Server 2008
    datadir="C:/ProgramData/MySQL"

  7. Chage Log On as properties for MySQL Service to Mysql_user.
    MySQL Service > Properties > Log On > This account > Select Mysql_user

  8. Log Off Admin account

  9. After Log On again, MySQL Service will be started under Mysql_user User Name.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.