MySQL on Windows Refuses to Start as a Service I am trying to install MySQL 5.7.33 onto a windows 2012 server. A process I have done many many times.
I have copied the Zip file onto the server and expanded it into G:/mysql57/ (the same zip file I used to install on other servers previously without issues).
I place a my.ini file into this directory. Then I initialize the database:
G:/mysql57/bin/mysqld.exe --initialize --basedir=G:/mysql57/ --datadir=G:/mysql57/data/
So far so good. The error log is created along with temporary password. I then install the service:
G:/mysql57/bin/mysqld.exe --install MySQL57 --defaults-file=&quot;G:/mysql57/my.ini&quot;
I then try to start the service, which results in:
Error 1053: The service did not respond in a timely fashion
It also annoyingly doesn't add anything to the error log.
If I try and run mysqld manually however it works fine, no errors
G:/mysql57/bin/mysqld.exe --defaults-file=G:/mysql57/my.ini
I can log in, I change my password etc.
Yet starting the service fails, every time.
I should point out that there is another MySQL database on there in D:/mysql (MySQL 5.5) which is using port 3306 and runs fine. This new one is using Port 3307.
Again a process I have done many times over.
I have checked the Windows Event Viewer, nothing.
I have tried the my.ini file from the old database.
I have tried a minimal my.ini file (port, basedir and datadir only).
Still nothing.
Is there anything else I have missed, as I've now lost most of a day on something that was supposed to be done by lunchtime.
It seems it all came down to the &quot; &quot; which it didn't like.
So I changed:
G:/mysql57/bin/mysqld.exe --install MySQL57 --defaults-file=&quot;G:/mysql57/my.ini&quot;
to
G:/mysql57/bin/mysqld.exe --install MySQL57 --defaults-file=G:/mysql57/my.ini
and it started up straight away. I can only assume this is something to do with Windows Server 2012, as I repeated the whole process (with &quot; &quot;) on my Windows 10 PC, and it worked fine.