My local MySQL server starts via CMD, but won’t start as a Windows service

command lineMySQLwindows

When I start MySQLd via the command line, it starts perfectly fine and I'm able to run queries on the database:

C:\Users\Nicholas>"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini"

(program is running)

However, the moment I try to start the program as a Windows service (whether in Task Manager or on the command line), the daemon instantly dies.

C:\Users\Nicholas>"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" MYSQL57

C:\Users\Nicholas>

I renamed my COMPUTER.err file and it does not generate any errors when it exits like this.

Does anyone know what could be preventing this from starting as a service?

Best Answer

The only way I was able to fix this was to completely reinstall Windows sadly.

Related Question