问题
I am not able to start the MySQL server on my Windows system. When I tried in services.msc to run, I got this error:
Starting it through the XAMPP control panel does not work either:
Can you help me to solve this?
回答1:
- Open windows services (Start->run ->Services.MSC)
- Find service with name "Mysql Server" and check path, it should be something like that:
"C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL51\bin\mysqld.exe" "--defaults-file=C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\Data\my.ini" MySQL
- Make sure that Mysql folder and executable file mentioned above exist by this path.
OR
Sometimes the file name of mysqld-nt.exe renamed to mysqld-nt.exe~ so rename it back to its original name and this may solve the problem.
回答2:
- Go to the path: C:Programs Files\MariaDB 10.2\data..
- Lookout for my.ini file. Open the file and check the path for "datadir".
- If that does not match to your installed directory then update it.
- Your problem will be solved for sure.
来源:https://stackoverflow.com/questions/41932056/windows-could-not-start-the-mysql-service-on-local-computer-error-2-the-syst