Now the only thing I could think was that the Atlassian Stash service was getting started before MySQL was completely up, so I went looking at the dependencies:
C:\Users\rweaver>sc qc AtlassianStash
[SC] QueryServiceConfig SUCCESS
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\Atlassian\Stash\3.2.0\bin\tomcat7.exe //RS//AtlassianStash
TAG : 0
DISPLAY_NAME : Atlassian Stash AtlassianStash
DEPENDENCIES : Tcpip
SERVICE_START_NAME : LocalSystem
The dependencies obviously didn’t include the MySQL56.
So I thought the logical thing to do would be to add a dependencies to the MySQL56 service, and then make the Atlassian Stash service dependent on that, so I ran the following:
C:\Users\rweaver>sc config MySQL56 depend= MySQL56/Tcpip/Afd
[SC] ChangeServiceConfig SUCCESS
This makes the service depend on MySQL56, and appears to resolve the issue.