Mysql service is missing
Solution 1:
I have done it by the following way
- Start cmd
- Go to the "C:\Program Files\MySQL\MySQL Server 5.6\bin"
- type mysqld --install
Like the following image. See for more information.
Solution 2:
Go to your mysql bin directory and install mysql service again:
c:
cd \mysql\bin
mysqld-nt.exe --install
or if mysqld-nt.exe is missing (depending on version):
mysqld.exe --install
Then go to services, start the service and set it to automatic start.
Solution 3:
I also face the same problem. do the simple steps
- Go to bin directory copy the path and set it as a environment variable.
- Run the command prompt as admin and cd to bin directory:
- Run command : mysqld –install
- Now the services are successfully installed
- Start the service in service windows of os
- Type mysql and go
Solution 4:
If you wish to have your config file on a different path you have to give your service a name:
mysqld --install NAME --defaults-file=C:\my-opts2.cnf
You can also use the name to install multiple mysql services listening on different sockets if you need that for some reason. You can see why it's failing by copying the execution path and adding --console to the end in the terminal. Finally, you can modify the starting path of a service by regediting:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NAME
That works well but it isn't as useful because the windows service mechanism provides little logging capabilities.