Why is MySQL server not starting after changing datadir?

Why is MySQL server not starting after changing datadir?

When editing the my.ini file, the server could not read it because it is default saved in UTF-8. By choosing “Save As” and selecting the ANSI encoding, it worked fine. Server was not starting for me after changing data folder.

Why is MySQL service not starting in Windows 10?

The MySql Service is running under the NETWORK SERVICE user, so I have given this user full control permission on the new folder. Deleted the original data folder. MySql Service fails to start, with no useful error messages appearing in the windows event logs.

Why is mysqld.service in failed state?

Jan 13 06:01:53 server1.lifeandme.net systemd [1]: Unit mysqld.service entered failed state. Jan 13 06:01:53 server1.lifeandme.net systemd [1]: mysqld.service failed. I also tried restart the service and cleaning log files under /var/lib/mysql , but no success

Why did MySQL upgrade from 5.7 to 8.0?

Description: Ran the mysql upgrade shell to conduct a check before upgrading from 5.7 to 8.0. Only errors found was my use of three system variables that will be removed: “13) Removed system variables Error: Following system variables that were detected as being used will be removed.

Where to find MySQL service fails to start?

MySql Service fails to start, with no useful error messages appearing in the windows event logs. As far as I know, the MySql error logs are located in the datadir, so it’s not much help looking there?

Why is MySQL service not starting after changing my.ini?

Stupidly I did not back it up first, and I used Notepad, which doesn’t have multiple undo. There are no errors logged in the MYSQL log either. I’m sure I’ve accidentally deleted an important line or something, but can’t for the life of me find it. This is the section of my.ini that I changed:

Why does MySQL not start in Windows 10?

The only thing that worked for me was to edit the my.ini file using Notepad++ do NOT use Windows Notepad as any change will stop mysql from starting. I would guess this is because mysql fails to parse the file, so uses internal defaults which are no good as its looking for mysql master db in ‘program files’.

How to restart mysqld as a non-root user?

Edited /etc/my.cnf to change the [mysqld] block to reflect the new location in both datadir and socket saved the file and then tried to restart the mysqld service as root user and non-root user but it won’t start.