I am unable to restart the server after changing the default datadir
from C:/ProgramData/MySQL/MySQL Server 5.7\Data
to D:/Data
.
datadir
to datadir="D:/Data"
mysql
Data
directory to D:/
What could be the reason for it?
Error snapshot:
However, it works fine if the original datadir path is restored.
First, open the Run window by using the Windows+R keyboard. Second, type services. msc and press Enter : Third, select the MySQL service and click the restart button.
Assign full permissions to the NETWORK SERVICE
for D:/Data
Ensure my.ini
is ANSI encoded with a tool like Notepad++.
I updated the datadir
in my.ini
with Windows Notepad and it apparently converted it to UTF-8; I copied the file over to a system with Notepad++, converted it back to ANSI before copying it back to the MySQL server and was able to start the MySQL service successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With