the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
Can anyone resol
The same problem happened with me also, nothing worked... I first deleted the service (in my case MySQL80 and MySQL) by command:
sc delete MySQL80
sc delete MySql
and then reinstalled MySQL. Mine was MySQL 8.0. And then everything was back to normal.
mysqld --initialize
Run the above after the install command. Then try to start the service - that should work.
You also might have accidentally added some wrong text in my.ini
file. Make sure no invalid character is added at the beginning on the file.
This error happened in my case when secure-file-priv was pointing to unexistent folder, make sure it exists and readable.
The line of code example in my.ini:
secure-file-priv="D:/MySQL/uploads"
Nothing was working for me but then I checked here. I ran that command qc sc mysql57
and copied the value of BINARY_PATH_NAME
from it. After that I checked this and changed the value of lower_case_table_names
from 0 to 2 in my.ini
file. Then in the command prompt, I ran this command - << BINARY_PATH_NAME >> --install-manual
. After that, I started the MySQL57 service and it worked.
Delete or rename the 2 following files from "C:\ProgramData\MySQL\MySQL Server 5.7\Data": ib_logfile0 ib_logfile1