This is a bit of a follow up to one of my previous questions regarding how to install mysql on windows server 2008.
I managed to install the mysql server etc. without any problems, it runs, I can connect to it via PHP using "." as host (strange, but ok).
In order to follow best practices and not let mysql running with too much privilegs, I tried to assign the mysql service a special user.
So here is what I did:
Run this command to create a user:
net user mysql * /add /passwordreq:yes /passwordchg:no /comment:"runs MySQL services"
(entering password information)
Run
services.msc
Find mysql service in the list, and assign it the "mysql" user I created (in the "Logon" tab).
Windows tells me that changes are done, but the service must be restarted.
I restart mysql service and here comes the error - windows tells me that mysql service could not be started because it exited unexpected.
When I do not assign mysql a user, it works. Did I miss something?
Answer
If you are still using the database files from when you had the database running as Administrator, you will need to give ownership of the database directory (and below) to the newly created user.
No comments:
Post a Comment