[mysql] mysqld: Can't change dir to data. Server doesn't start

When I encountered this same error, I noticed MySQL Configuration file in "C:\Program Files\MySQL\MySQL Server X.Y\" has changed to my-default.ini

I solved it by

  1. Copy my.ini from "C:\ProgramData\MySQL\MySQL Server X.Y\my.ini"
  2. Paste it in "C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
  3. Restart MySQL Server from services.msc

In the .ini file, their is part that reads:

# On Windows you should keep this file in the installation directory 
# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
# make sure the server reads the config file use the startup option 
# "--defaults-file".