3

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?

MadHatter
  • 79,770
  • 20
  • 184
  • 232
Jordan
  • 31
  • 1
  • 2

3 Answers3

3

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

Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
Zaw Htoon
  • 31
  • 1
  • Can only one user be assigned the "Log On" property of the MySQL Service? Or can multiple users be assigned this? – posfan12 Sep 17 '19 at 03:59
1

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.

Zaw Htoon
  • 11
  • 1
0

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

Sven
  • 98,649
  • 14
  • 180
  • 226