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?
Have you assigned appropriate rights for yor mysql user, e.g. "Log on as a service", "Log on as batch job", "Act as part of OS", "Bypass traverse checking", "Adjust memory quotas for process", may be "Lock pages in memory", and so on?
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.