MySQL57 service on local computer started and then stopped

When I try to start my SQL server, a message appears stating that it starts but then stops. This happened after a reboot on my server.

Does anyone know how I can fix this?

enter image description here

+6
source share
3 answers

Make sure that the data directory has full permissions set for the Network Service and Administrator users, and that you have quotation marks around the directory name if there are spaces in it. Make sure that basedir is set / not commented out.

I tested these things by changing the data directory that caused the error described above and then fixing the permissions of the newly created data directory to fix the error. I can switch back and forth, now I change which data directory I am commenting on. (only as a test, otherwise it’s nuts).

C: \ ProgramData \ MySQL \ MySQL Server 5.7 \ my.ini There should be something like this, using a Windows 2012 R2 server for testing:

# Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files/MySQL/MySQL Server 5.7/" # Path to the database root # datadir="C:/ProgramData/MySQL/MySQL Server 5.7/Data" datadir="d:/ProgramData/Data" 
+1
source

Try the following:

  • run 'cmd' as administrator
  • cd to your SQL folder,
  • run 'mysqld --initialize --user = mysql --console' to reset and
  • run 'net start mysql' to start the service.
0
source

add to my.inf configuration file on C: \ ProgramData \ MySQL \ MySQL Server 5.7

 [mysqld] tmpdir=C:/temp 

and everything will work well.

0
source

All Articles