When I try to start my SQL server, a message pops up saying that it starts but then stops. This happened after a restart on my server.
Does anyone know how I can fix this?
Even with correct ownership, MySQL might fail to start up if there is other security software running on your system that manages application access to various parts of the file system. In this case, reconfigure that software to enable mysqld to access the directories it uses during normal operation.
Certain versions of MySQL add invalid hex values at the beginning of the my. ini configuration file. Deleting the first three hex values using a hex editor should resolve this issue.
the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
As you can see in the above image, the service MySQL80 is running. It is easy to install and configure multiple instances of SQL Server on the same machine. You can create multiple named instances and store the system database, and log files in separate directories.
Make sure that the data directory has full permissions set for users "Network Service" and Administrator and that you have quotes around the name of the directory if there are spaces in it. Make sure that basedir is set / not commented out.
I tested these things by changing the data directory, which re-caused the error you describe above exactly, then fixed the permissions of the newly created data directory to eliminate the error. I can switch back and forth now my changing which data directory I comment out. (only as a test, otherwise that's kind of nuts).
C:\ProgramData\MySQL\MySQL Server 5.7\my.ini Should be something like this, using Windows 2012 R2 server to test:
# 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"
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