PDA

View Full Version : 7.53 not recreating my.cnf



bobkoure
2011-01-29, 08:48
I'm having something a bit odd happen when I try to move the cache to a different folder via the prefs file and modify the MySQL settings in my.cnf
- stop sb server
- stop sb mysql service
- modify my.tt in program folder
- delete my.cnf in cache folder

If I have renamed the old cache folder, sb server does not create a new my.cnf in the new cache folder - and sb mysql cannot start.

I'll try to figure out a bit more and followup, but, if you're using an alternate cache location, you might want to watch out for this.

bobkoure
2011-01-29, 11:07
I'm running SB server on a Win2k3R2/SP2 box, atom D525, 4M memory.
In my prefs file I have changed both cachedir and librarycachedir from
C:\Documents and Settings\All Users\Application Data\Squeezebox\Cache
to
R:\Squeezebox\Cache
I run into this whether sb server is set to be a service or an app

Also: if I copy the old cache folder to the new location (so there's a my.cnf in place), sb server will start, but sb mysql will not.
Once I've copied the old cache, if I stop both processes, delete my.cnf, restart sb server, sb server will write another my.cnf, but sb mysql will not start.

Same behavior for SqueezeboxServer-7.5.2-31545.
Same behavior for 7.5.4-31858.
Time to drop back to 7.3.4-28402

JJZolx
2011-01-29, 12:08
I wonder if this has anything to do with the changes made that give you a new performance option for database memory use. Maybe manual edits of the template file no longer work, since the server now has two MySQL config file templates, my.tt and my-hightmem.tt. Or maybe you need to edit the other one.

Settings > Advanced > Performance > Database Memory Config

I recommend installing your own instance of MySQL 5.0. Then you control the MySQL configuration completely and how the service runs.

The steps to follow are basically:


Install MySQL 5.0 (http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91). I believe the installer will either automatically configure it as a Windows service, or else give you the option to do so.

Install a MySQL management client (I use SQLyog (http://www.webyog.com/en/downloads.php)).

Using the client, log into the MySQL server as root.

Create an new (empty) database for Squeezebox Server with any name you like.

Create a MySQL user for SbS and give the account a password.

Grant the new user all permissions on the SbS database.

Change your SQL settings in server.prefs to something like the following:



dbpassword: myslimserverpwd
dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=sl imserver
dbusername: slimserver


Make sure the port is set to 3306, which is the standard MySQL port number. Set database to the name of the MySQL database you created, and enter the username and password of the account you created.


You can edit my.ini in the MySQL program directory as you like. Just restart the MySQL service to have it recognize the changes. You might have to edit my.ini after step #1 above to remove the IP address binding to be able to access the server from another machine on your network. If there's a bind-address=x.x.x.x line in the file, remove it.

bobkoure
2011-01-29, 12:20
Thanks! I'll try this and report back.

bobkoure
2011-01-29, 13:41
For anyone else looking at this, the MySQL link got mangled, it's downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91 (http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91)
there were several win flavors. I went with MySQL 'essentials'.

SQLyog looks pretty good, but it's a 30 day free trial. Maybe not the best fit for something I'd use a few times a year.
There's a "top 10" list of MySQL GUI clients here (http://www.databasejournal.com/features/mysql/article.php/3880961/Top-10-MySQL-GUI-Tools.htm).
Personally, I'm familiar with PHPMyAdmin, but I'm unexcited about installing Apache and PHP on this box.
I ended up using HeidiSQL (does all I need: create db, create user/password, assign rights to that user on that db)

With the prefs file modified, SBS 7.54 starts right up.
Time to mess with performance. :)

One question: what to do with the SqueezeMySQL service? I just left it set to 'disabled' but I may have missed something cleaner.

JJZolx
2011-01-29, 13:59
For anyone else looking at this, the MySQL link got mangled, it's downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91 (http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.91)
there were several win flavors. I went with MySQL 'essentials'.

SQLyog looks pretty good, but it's a 30 day free trial. Maybe not the best fit for something I'd use a few times a year.

Ah, sorry, I forgot about that. I have an older version of SQLyog (6.14) from when it was shareware.


One question: what to do with the SqueezeMySQL service? I just left it set to 'disabled' but I may have missed something cleaner.

Yes, set it to 'Disabled' so that Squeezebox Server will be unable to start it up. You can manually uninstall the service using instsrv.exe from the Microsoft Resource Kit Tools (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en), but if you run the SbS installer in the future it will just be created again.

C:\>instsrv SqueezeMySQL remove

bobkoure
2011-01-29, 14:57
I notice that MySQL already has
innodb_buffer_pool_size=305M
This was with the "mixed" (meaning this PC is used for stuff other then MySQL) option - and is just slightly large for me.
The 'highmem' option in SBS sets it to just 32M. I suspect we need a 'loads-of-mem' option.

Without SbMySql complications, it was trivial getting the cache moved over to ramdrive (I did modify both of those settings in prefs, still not sure what the 'library' one does).

BTW, for Win2k3, I've had very good luck with the Dataram ramdisk (http://memory.dataram.com/products-and-services/software/ramdisk#download-ramdisk).
- free (up to 4G)
- can load from a disk image at system start (file system driver)
- can save to drive image at shutdown
- has an auto save feature

bobkoure
2011-01-30, 08:59
The tables I setup for SBS were INNODB / latin1 as that seemed to be what the "built in" MySQL in SBS was using, and, at the time I was aiming at just making it work.

Now, I'm reading about MySQL performance.
It looks like SBS is not at all a transactional system, and, as such, INNODB is going to be slower (transactional safety) than ISAM.
Does that make sense?
Is there any reason I can't just switch? I realize that SQL is supposedly platform neutral, but that's only if you don't use any extensions. I've no idea if MySQL INNODB has extensions that ISAM doesn't. Any idea?
Thanks!

JJZolx
2011-01-30, 09:06
You didn't set up the tables yourself, did you? Squeezebox Server should have done that when it was first run.

I'm not sure if you'd see a noticeable difference by switching anything to ISAM. The tables that SbS works with aren't very large.

bobkoure
2011-01-30, 19:07
Nope, just created a database.
I'm sure you're right about not seeing a difference, particularly with everything either in memory or ramdisk.