Bugzilla – Bug 4713
Add database configuration to server settings
Last modified: 2011-12-04 03:33:44 UTC
This is the only thing I need to edit in the prefs file when I set up a new SlimServer, since there's no other means of configuring these settings. The following fields should be available and separated, not presented as a DBI connection string as currently stored in the prefs file. Server Name or IP Address: Server Port Number: Database Name: Username: Password:
only after all supports are in place for custom setups of those prefs. there is a reason that they aren't an exposed pref for now. This is not an argument, just an explanation. "should" is a word that needs to be used sparingly.
One thing I just realized is that SlimServer startup fails if it can't connect to a database. That will need to be fixed. Since no part of the configuration is stored in the database, there's no reason that the web interface can't run, though I realize that it may take quite a bit of redesign to keep the server from crashing when it can't see the database. Instead, force the display of the database settings page and display a warning on the SB display. Also, implement a test on the settigns page and display an error if the server can't connect to the database, similar to the way the music folder test works now.
probably worth making that note in the "setup wizard" bug report.
For a power user who is setting up their own DB, this doesn't seem like a really huge barrier. Could it be made easier with some documentation and/or sample config files?
Its not a huge barrier, but its far more klunky than it needs to be. Port, host, user, password and database/schema name are how you specify connections to any database that I've used in the past decade. JDBC, ODBC, DBI, etc. Its a small thing, but the perfs file would be more obvious and how to change it would be much more obvious with them separated. For instance, there is no documentation anywhere on what the %s is in the dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=%s string. Its clearly the database name, but its not clear or documented or even given as an example in the server.prefs.
Suggest targeting this for 7.6, since a means of switching between database systems from the web ui has now been added. Unfortunately it will be unusable on the many servers that are running the system installation of MySQL on the standard port 3306 and are most likely using a username with password. If nothing else, please add options for database username, password and dbi connection string.
Unassigned bugs cannot have a priority.
Well, I suppose this is invalid now that MySQL is no longer officially supported. There isn't much to configure with SQLite, which has no security settings or ports.