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"
source share