PDA

View Full Version : Error: Couldn't install MySQL as a service!



AndrewFG
2008-03-12, 11:22
Hi,

I am starting SqueezeCenter as a service. However the "server.log" file reports the following error:

<quote>
Server [08-03-12 19:12:40.7545] Slim::Utils::MySQLHelper::startServer (272) Error: Couldn't install MySQL as a service! Will run as a process!
</quote>

Any idea what is causing this?

Ross L
2008-03-12, 11:53
What operating system?

AndrewFG
2008-03-12, 14:29
What operating system?

Vista Ultimate 32 bit with all the updates...

mherger
2008-03-12, 14:45
> I am starting SqueezeCenter as a service. However the "server.log" file
> reports the following error:

And it's starting successfully?

> Server [08-03-12 19:12:40.7545] Slim::Utils::MySQLHelper::startServer
> (272) Error: Couldn't install MySQL as a service! Will run as a
> process!
> Any idea what is causing this?

Are you running the service under a certain account? If so, maybe that user doesn't have the privileges to install services. But it's nothing critical if MySQL can be run as a process. It just takes a bit longer to start SC.

--

Michael

JJZolx
2008-03-12, 15:18
Are you running the service under a certain account? If so, maybe that user doesn't have the privileges to install services. But it's nothing critical if MySQL can be run as a process. It just takes a bit longer to start SC.

You know this has been a question of mine ever since SS's MySQL was first installed as a service...

Over the weekend I installed the SC 7.0 release using the Windows installer, then I ran the service enabler. I decided to let it keep running with the bundled MySQL rather than the other MySQL server that I have running on the machine. This is the first time in quite a while that I've had the EXE version of SS/SC running.

What I'm seeing is that the bundled MySQL service is being started and stopped whenever the SqueezeCenter service is started and stopped. Is that the expected behavior? If so, the question I then have is what's the advantage of running MySQL as a service like this? MySQL as a service won't start or stop any faster than MySQL run as a user program and it must be started each time SC is started.

AndrewFG
2008-03-13, 03:31
In answer to your questions:

1) Yes SqueezeServer is reported as running under Windows | Services. (But whther that means running *successfuly* I can't say...)

2) I don't want to run SqueezeServer under my full admin account; (sorry guys, but I don't trust you that much). So I created a special account for SqueezeCenter and have given this account access privileges to i) my music folder and ii) my itunes xml and playlist folders.

3) You ask if this account has permission to install services. I guess probably not. Do I correctly understand that SqueezeServer itself is trying to install another service (e.g. MySql) in addition to itself? If so what do I need to do to allow SqueezeServer to install this service? -- Without giving it full admin rights, and thus destroying the whole point of making a separate account anyway...

mherger
2008-03-13, 03:48
> 1) Yes SqueezeServer is reported as running under Windows | Services.
> (But whther that means running *successfuly* I can't say...)

Can you use SC?

> 2) I don't want to run SqueezeServer under my full admin account;
> (sorry guys, but I don't trust you that much). So I created a special
> account for SqueezeCenter and have given this account access privileges
> to i) my music folder and ii) my itunes xml and playlist folders.

Services don't run in an admin mode by default, but under a restricted service user.

> 3) You ask if this account has permission to install services. I guess
> probably not. Do I correctly understand that SqueezeServer itself is
> trying to install another service (e.g. MySql) in addition to itself?

Correct.

> If so what do I need to do to allow SqueezeServer to install this
> service? -- Without giving it full admin rights, and thus destroying
> the whole point of making a separate account anyway...

Don't define any account at all. It won't have admin rights. Or just leave it as is. MySQL does not _need_ to be run as a service. If it's running fine without, be happy with it.

--

Michael

AndrewFG
2008-03-13, 08:31
Can you use SC?

Yes :-)

Services don't run in an admin mode by default, but under a restricted service user.

The SC7 SqueezeCenter Startup Options application prompts for an account name and password.
And it warns that if you don't enter such, then it will run in anonymous mode and may not be able to access my music folders.
I can confirm that this latter statement is indeed true :-(

Don't define any account at all. It won't have admin rights.

But -- see above -- it cannot access the music folder either...

mherger
2008-03-13, 10:26
> Can you use SC?
> Yes :-)

Well, then you're all set and done. Don't bother about MySQL being run as service or not, enjoy your music!

--

Michael

AndrewFG
2008-03-13, 10:55
> Can you use SC?
> Yes :-)

Well, then you're all set and done. Don't bother about MySQL being run as service or not, enjoy your music!



It's easy for you to say that, but nevertheless the software is reporting an error in its log file; and software writers don't do that unless there is something wrong; so IMHO it still needs to be fixed!

mherger
2008-03-13, 11:15
> It's easy for you to say that, but nevertheless the software is
> reporting an error in its log file; and software writers don't do that
> unless there is something wrong; so IMHO it still needs to be fixed!

The software was designed to fall back to process mode if the service can't be installed, as this situation is to be expected. The bug here is that there's an error message and not just an information. Really.

--

Michael

mherger
2008-03-13, 11:22
> The software was designed to fall back to process mode if the service can't be installed, as this situation is to be expected. The bug here is that there's an error message and not just an information. Really.

This "bug" should be fixed in tomorrow's build.

--

Michael

JJZolx
2008-03-13, 11:28
Something I don't understand... Doesn't the Windows installer install the MySQL service? Or is the MySQL service really installed by SC when it's run?

mherger
2008-03-13, 23:26
> Something I don't understand...

You don't need to.

> Doesn't the Windows installer install the MySQL service?

No it doesn't.

> Or is the MySQL service really installed by SC when it's run?

It is. I don't have the answer for your next question "why?", though.

Michael

JJZolx
2008-03-14, 02:59
> Something I don't understand...

You don't need to.

Of course.


> Doesn't the Windows installer install the MySQL service?

No it doesn't.

Wouldn't it logically be most likely that the user most privileged to install a service would be the user installing SC server in the first place? If you really need to install a service then this is the time to do it.


> Or is the MySQL service really installed by SC when it's run?

It is. I don't have the answer for your next question "why?", though.

Why not once-and-for-all throw out the odd idea that installing MySQL as a service has _any_ benefit to either the user or to SqueezeCenter? If it's a dependant process to SqueezeCenter then have SqueezeCenter launch it at startup.

mherger
2008-03-14, 03:08
>> It is. I don't have the answer for your next question "why?", though.
>
> Why

Didn't I tell you? :-)

--

Michael

AndrewFG
2008-03-14, 04:00
In the meantime I discovered a work around that seems to work.

1) Open Windows Services application

2) Select the SqueezeCenter service and set its Start Type to "Automatic - Delayed"; and set its Logon As a defined user account on your PC that you have granted access to your Music (and iTunes) folders

3) Select the SqueezeMySql service and set its Start Type to "Automatic"; leave its Logon As set to Local System

4) Close Services and Reboot the machine

bobkoure
2008-03-14, 06:16
You could also set your SqueezeCenter service to "depend" on the MySql service (so, whenever the SqueezeCenter service was started, the SCM would start SqueezeMySQL first, then SqueezeMySQL.
In windows versions prior to Vista (and almost certainly in Vista) you do this in the registry, not the services control manager.
Open your registry editor - go to key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\squeezesvc
Look for a sub-key called DependOnService.
If it doesn't exist
- create it as a MULTI_SZ
- the data is SqueezeMySQL

If it does exist (maybe you already did this for MusicIP?)
- edit it
- add an additional line to the data - SqueezeMySQL

I'm actually a bit surprised that the SqueezeCenter install process doesn't just do this - I guess it's a matter of being able to support already-installed generic MySQL installations.

AndrewFG
2008-03-14, 10:18
In windows versions prior to Vista (and almost certainly in Vista) you do this in the registry, not the services control manager.

Thanks for the tip. I can confirm that in Vista it works via the registry in the same way as you suggest. (But don't you think it is odd that you cannot do this via the services control manager?)

AndrewFG
2008-03-15, 06:29
You could also set your SqueezeCenter service to "depend" on the MySql service (so, whenever the SqueezeCenter service was started, the SCM would start SqueezeMySQL first, then SqueezeMySQL.
In windows versions prior to Vista (and almost certainly in Vista) you do this in the registry, not the services control manager.
Open your registry editor - go to key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\squeezesvc
Look for a sub-key called DependOnService.
If it doesn't exist
- create it as a MULTI_SZ
- the data is SqueezeMySQL

If it does exist (maybe you already did this for MusicIP?)
- edit it
- add an additional line to the data - SqueezeMySQL

I'm actually a bit surprised that the SqueezeCenter install process doesn't just do this - I guess it's a matter of being able to support already-installed generic MySQL installations.

Please note: I tried setting a dependency as you suggest. However, it does not work. OTOH my solution of starting the service Automatically Delayed does seem to work...

bobkoure
2008-03-15, 12:52
Does not work in the sense that the MySQL service isn't started before SqueezeCenter? Some other way? The spelling matches the name of the mySql service in currentcontrolset/services?

BTW, the inability to set a service dependency in the SCM has been there since NT5.