Bug #76476 MySQL Installer Stuck on “Starting Service”
Submitted: 24 Mar 2015 21:39 Modified: 1 Sep 2016 2:45
Reporter: Nenad Bulatovic Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.6.22 OS:Windows
Assigned to: Jose Gabriel Valencia Ornelas CPU Architecture:Any
Tags: installer, MySQL, stops

[24 Mar 2015 21:39] Nenad Bulatovic
Description:
I was installing mysql installer on my windows 7 pro 64 buit machine. 
During the server configuration process, it gets stuck at "starting server" and doesn't move any further. The log for the same is :

Beginning configuration step: Stopping Server [if necessary] Ended configuration step: Stopping Server [if necessary]

Beginning configuration step: Writing configuration file Ended configuration step: Writing configuration file

Beginning configuration step: Updating firewall Adding firewall rule for MYSQL56 on port 3306. Successfully added firewall rule. Ended configuration step: Updating firewall

Beginning configuration step: Adjusting Windows service [if necessary] Attempting to grant Network Service require filesystem permissions. Granted permissions. Adding new service New service added Ended configuration step: Adjusting Windows service [if necessary]

I have already tried the following:- 
1. Uninstalled everything including installer from it's own uninstall option.
2. Un-installed all the programs that were in any way related to mysql
3. Deleted the mysql folder from C:\Program Files
4. Deleted the mysql folder from C:\ProgramData 
5. Cleared my registry and then re-installed the program, but all in vain.

How to repeat:
Here is what I did:

1. Installed it with mysql-installer-web-community-5.6.23.0.msi
2. For my purposes I selected "Custom" install with MySQL servers 5.6.22 - X64 and MySQL Connectors -> Connector ODBC/5.3.4 - 64
3. Next -> Execute -(ready to configure) -> Next
4. Config type: Development machine, all defaults (TCP/IP, Port: 3306, Open firewall)
5. Typed in MySQL Root Password
6. MySQL user Accounts -> Add user (username, password, OK) -> Next
7. Configure MySQL Server as a Windows Service (CHECKED)
8. Windows Service Name: MySQL56 (default)
9. Start the MySQL Serve at System Startup
10. THIS IS CRUCIAL (BUG IS HERE): Run Service as... Standard System Account (CHECKED - but it will be disregarded and that is BUG)
11. Next -> Execute, Installation hangs on Starting server, so wait for a while to time out (or don't, your choice). When Dialog (might be covered with other windows) popup with message "Configuration of MySQL Server is taking longer than expected..., here click OK (so to wait longer)

Suggested fix:
12. Meanwhile go to Start -> Control Panel -> Administrative Tools -> Services -> find MySQL56, right click on it -> Properties -> select Log On Tab AND HERE IS BUG -> Although Local System Account was selected, Somehow "This account: Network Service (with some password) was selected -> Select Log on as: Local System Account, Allow service to interact with desktop -> Apply -> Go back on general tab

13. On general tab click on "Start" button to start service and here it is! Service is started! Click on OK to close MySQL56 Properties dialog. Close Services dialog. Close Administrative tools. Close control panel.

14. And by that time (while you were closing those dialogs) when you look at MySQl Installer Dialog all steps are finished and checked: Starting Server, Applying security... Creating user accounts.. Updating Start menu link

15. Confirm with Finish -> Next -> Finish
That's it, happy MySQL-ing :)
[24 Mar 2015 22:18] MySQL Verification Team
Message taking longer...

Attachment: service_wait_dialog.png (image/png, text), 156.05 KiB.

[24 Mar 2015 22:26] MySQL Verification Team
I was able to repeat the part of the dialog and stuck in the finish part. The service was started though:

SERVICE_NAME: mysql561
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL561
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : MySQL561
        DEPENDENCIES       :
        SERVICE_START_NAME : NT AUTHORITY\NetworkService

C:\dbs\5.6>sc query mysql561

SERVICE_NAME: mysql561
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
[1 Jun 2015 23:45] Javier Treviño
Thanks for the bug report.

Need more information, tested in several different computers and cannot reproduce. The dialog stating the service is taking longer than expected to start is totally expected and can happen on slow computers (or Virtual Machines), and is just informational.

If the dialog appeared, and after the Installer reported that it finished with the configuration the service did not start and had to be started manually, there is a bug and we need to know more information about the environment where this was reproduced (Windows version, 64bit or 32bit, etc...).

If the service started after waiting all the time needed by the Installer to configure that step, then this is not a bug.
[2 Jun 2015 11:05] Nenad Bulatovic
Intel 3770K with 16GB on Windows 7 64 bit is hardly "slower" machine.
Other people have confirmed this strange behaviour. 

http://stackoverflow.com/questions/26047524/mysql-installer-stuck-on-starting-service

http://stackoverflow.com/questions/26970454/mysql-configuration-stops-at-starting-server
[11 Aug 2015 6:20] Chiranjeevi Battula
Bug#78002 marked as duplicate of this one.
[19 Aug 2015 22:25] Jose Gabriel Valencia Ornelas
tested, can't reproduce

we need more information, perhaps there is an special environment, the user rights, corporate policies, etc.... 

by default we set the Network Account as the user without a problem.

please provide more info that help us to reproduce this error.
[15 Sep 2015 8:23] Dan March
I've had the same problem. Tried to reinstall 5 times and last time waited for the "Starting Service" for 4 hours and nothing happened.
Today I tried 3 times and surprisingly I got through that step but i got stuck on the next step (security) or something.
So I reinstalled MySQL once more but what I did was - turned off ALL windows Firewall options, then the whole installation went through smoothly.

So I cannot comment more on why in the first place I was stuck on "Starting Service" so many times.

My machine is 8 GB ram, Win 7 x64(laptop).
[17 Sep 2015 21:43] Jose Gabriel Valencia Ornelas
Hi

Could you please provide me if what configuration do you have in your windows firewall related to mysql server please?
[12 Oct 2015 20:17] Jose Gabriel Valencia Ornelas
Posted by developer:
 
The use of Network Service Account is totally intentional by the Installer and is discouraged the use of Local System Account (NT AUTHORITY\SYSTEM) because is a very high-privileged built-in account. It has extensive privileges on the local system.

Unfortunately Dev and QA team was unable to even reproduce the issue, we tested several times in different boxes with different scenarios and work all of them.

Do you have any custom, third-party or an special policy that could be preventing the service starts using the pre-defined account (Network Account) what is store in the event viewer? an error or something when try to start the service?, if that is so can you provide that info please, that could help us to find why that account is not working for you

here is a a page where you can read more about the accounts pre-built and the recommendation to use, we always recommend and encourage to use an account that provide the minimum rights needed http://mysoftwarelab.blogspot.com/2010/12/localservice-vs-networkservice-vs.html
[15 Oct 2015 6:28] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=78838 marked as duplicate of this one.
[9 Nov 2015 14:21] Дмитрий Гусев
Network service does not have permission to c:\windows\temp.
Windows 2012, Windows 10.
Version 5.7.9 same problem.
[28 Feb 2016 20:04] Michael Highguy
Windows Server 2012 R2 On VMware Workstation 11.0.0 build-2305329
4G RAM
2 Proc
2 Core per proc

The only related information I have to send is:
Provider
   [Name]        MySQL
EventID          100
   [Qualifiers]  49152
Level            2
Task             0
Keywords         0x80000000000000
[1 Sep 2016 2:07] Javier Rivera Zavala
Posted by developer:
 
The use of Local System Account (NT AUTHORITY\SYSTEM) is highly discouraged because is a very high-privileged built-in account and has extensive
privileges on the local system.  Network Service Account is totally intentional by the Installer and its the one recommended for such cases.

The only thing we could think of for this case is that maybe the permissions set of your Network Service Account was lowered by an external 3rd party programs related to security in which case we will not be able support it.

here is a a page where you can read more about the accounts pre-built and the recommendation to use, we always recommend and encourage to use an account that provide the minimum rights required: http://mysoftwarelab.blogspot.com/2010/12/localservice-vs-networkservice-vs.html
[20 Dec 2016 12:24] Chiranjeevi Battula
http://bugs.mysql.com/bug.php?id=84208 marked as duplicate of this one.
[30 Sep 2017 15:15] Madhusudan D
I have this issue too. I started installing MySQL (developer setup) and with all the default options selected. But during the installation in the configuration stage, Updating Start Menu Link step fails and then cannot proceed further. Please help.

OS: Windows 10 - 64 (Bit) (latest updated with windows creative update)
[31 Jan 2018 0:33] Javier Treviño
The issue you describe is different than the one in this bug report.
Please test using the latest MySQL Installer version and if you can still repro please create a new bug report, but I am pretty sure you will not get that error in the latest version.
[19 Mar 2018 3:43] Ian Calegory
The MySQL developers insist that running the MySQL service Logged On as NETWORK SERVICE IS the proper way to do it, and that running it as LOCAL SYSTEM opens security holes. Okay people, the root of the problem here is that NETWORK SERVICE can't access the locations where the log files are configured to be. I suspect this error occurs when a folder is specified (by clicking Browse) that the NETWORK SERVICE doesn't have access to. In my case, I specified the log files to be written under My Documents in a folder called MySQL Logs. So, (and this can be done while the installer dialog is open, it saying the installer is taking a long time, and prompting you to Wait or Cancel,):

I simply granted full control of that folder to the NETWORK SERVICE by right-clicking on the folder, selecting Properties, selecting Security, then clicking Add, then typing in "NETWORK SERVICE". Then I selected NETWORK SERVICE and clicked the checkboxes Allow for Full control and Modify.
[19 May 2018 12:41] paul rasdcliffe
I have a similar problem. I tried to upload a mysql dump file from another server using mysqk workbench It hung with an error message about an error in the sql file. I can now not clear this error message nor restart mysql, despite removing and re-installing mysql.
Paul Radcliffe
[28 Sep 2018 20:21] Vitor Dias
Same bug here. MySQL stucked at starting server step.
--------------------
Here goes some info:
PC DELL, 
x64, 
Windows 10, 
mysql-installer-web-community-5.7.18.1.msi,
mysql-5.7.23-winx64.msi,
-------------------------
Log from MySQL Installer:
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]

Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file

Beginning configuration step: Updating firewall
Adding firewall rule for MySQL57 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall

Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]

Beginning configuration step: Initializing Database [if necessary]
Deleting Data folder shipped
Attempting to run MySQL Server with --Initialize-insecure
Running process: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console
Waiting for the server stops: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console
2018-09-28T19:42:25.812420Z 0 [ERROR] Unknown suffix '.' used for variable 'lower_case_table_names' (value '0.0')
2018-09-28T19:42:25.812497Z 0 [ERROR] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
2018-09-28T19:42:25.812522Z 0 [ERROR] Aborting

The attempt to initialize the database Failed
Ended configuration step: Initializing Database [if necessary]

Beginning configuration step: Starting Server
Starting MySQL as a service(PROBLEM HERE).
--------------------------
I already take some actions to solve it, but no exit.
First solution: Delete all files, folders and the service running(stop it) and remove using ("sc delete mysqlxx"), xx is the version number. Used CCleaner to remove all entries from regedit and then reinitiated the computer.
Secund Solution: Control Panel -> Administrative Tools -> Services -> MySQL57(right click) -> Logon -> Alter from Network Service to Local Service. Apply changes. Close all remaining windows but MySQL Installer not.
------------------------------------------
I forgot to say that I was trying to install MySQL server only on a development machine. I saw on the web, that if you use only letters and numbers without special chars, this installation works fine. I'll try it, then say here again if worked.
[28 Sep 2018 21:50] Vitor Dias
I solved my problem by doing an upgrade from 5.7.xx to 8.0.12.0
It passed all steps. No problem.
[17 Jul 2020 3:19] akhilesh tallam
I couldn't find MySQL56 on service catalog
[10 Feb 2022 19:52] Hichame Chida
I solved the same problem by enabling the parameter "Beta : Use UTF-8 for worldwide language support" in Control Panel > Region > Administrative > Change system locale> check Beta : Use UTF-8. Then I cancelled the installation, I opened the installer, clicked on "reconfigure" and proceeded with the execution.