Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Pi3B+, Pi3B and MYSQL

    I am one of those odd people who prefers to run MYSQL rather than SQLITE.

    I recently purchased a Pi3b+, installed LMS 7.91 on it (7.90 on the old Pi3B) and changed the prefs file to use MYSQL.

    At the same time I installed Mariadb 10.11.23 (have been using MYSQL 5.557 on the pi3B).




    Scan times for my 16,338 tracks (on a USB 2TB WD elents disk) are as follows (No plugins are in use on either Pi):

    Pi3B 35 minutes

    Pi 3B+ 15 minutes

    Remember this is not a direct comparison between Pi3B and Pi3B+ as the database version on the Pi3B+ is much newer, and LMS is slightly newer, but it seems to indicate that upgrades can sometimes be worthwhile. On the other hand, at the same time I upgraded my php from 5.6 to 7.0 and am having to rewrite all my programs to use the MySQLi Extension, which is a major PITA....

    JerryS

  2. #2
    Quote Originally Posted by JerryS View Post
    I am one of those odd people who prefers to run MYSQL rather than SQLITE.


    JerryS

    I would be too - but I didn't think it worked anymore. I'm running the latest nightly (Version: 7.9.1 - 1522249619) on an Ubuntu 16.04 server which is already running an instance of MySQL with data on a RAID partition (the default path for the sqlite3 data file is on my system drive). What changes would I need to make to switch to MySQL?

  3. #3
    Quote Originally Posted by dagadog View Post
    I would be too - but I didn't think it worked anymore. I'm running the latest nightly (Version: 7.9.1 - 1522249619) on an Ubuntu 16.04 server which is already running an instance of MySQL with data on a RAID partition (the default path for the sqlite3 data file is on my system drive). What changes would I need to make to switch to MySQL?
    Hi,

    Sorry I missed your post, hence the delay in replying.

    To make a couple of disclaimers, firstly I am no LMS or MYSQL expert and have no experience other than running MYSQL on localhost (the same computer LMS is installed on). I should also say that I am not the most organised person when it comes to documenting installation procedures, I tend to 'google on the go' and hope for the best.

    However, I can tell you that LMS 7.9.1 - 1521438894 is running nicely with MariaDB-9+deb9ui on my pi3B+

    My install notes are as follows (for what they are worth)

    1. Install MariaDB

    2. I tried to add perl support (apt-get install libbd-mysql-perl but this was evidently installed already with MariaDB)

    3. Create database slimserver and add user to priviledges (slimserver, host any, no password '') (In phpMyAdmin mine looks like this username slimserver hostname localhost password no global priviledges USAGE Grant No)

    4. Set himemory off in Web browser (Settings/Advanced/Performance/Database Memory Config = Normal)

    5. STOP LMS (sudo service logitechmediaserver stop)

    6. edit server.prefs in var/lib/squeezeboxserver/prefs as follows:-

    dbhighmem: 0
    dbpassword: ''
    dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=sl imserver
    dbtype: MySQL
    dbusername: slimserver

    (I presume, but don't know, that dbsource is the place to specify the url of the db location if not on local host, IP address maybe?)

    7. Start LMS

    8. Start a scan if it doessn't happen automatically

    9. Check using phpMyAdmin or something that the LMS tables are being populated by the scan.

    Hope this is helpful

    Regards

    Jerry

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,014

    Pi3B+, Pi3B and MYSQL

    > 4. Set himemory off in Web browser
    > (Settings/Advanced/Performance/Database Memory Config = Normal)


    Why would you do so?

    --

    Michael

  5. #5
    Quote Originally Posted by mherger View Post
    > 4. Set himemory off in Web browser
    > (Settings/Advanced/Performance/Database Memory Config = Normal)


    Why would you do so?

    --

    Michael
    Sorry, Dunno. I got the instructions for switching from SQlite to MYSQL years ago, from a forgotten source but presumably from somewhere in these forums and they definitely told me to turn himem off. In my most recent installation I initially forgot to do this and things didn't work until I remembered. Sorry, clueless, but worked fine once I remembered.

    Thanks once more for all your efforts, and it is a major bonus to me that I can use LMS with mysql.

    regards

    Jerry

  6. #6
    Quote Originally Posted by JerryS View Post
    Hi,

    Sorry I missed your post, hence the delay in replying.

    To make a couple of disclaimers, firstly I am no LMS or MYSQL expert and have no experience other than running MYSQL on localhost (the same computer LMS is installed on). I should also say that I am not the most organised person when it comes to documenting installation procedures, I tend to 'google on the go' and hope for the best.

    However, I can tell you that LMS 7.9.1 - 1521438894 is running nicely with MariaDB-9+deb9ui on my pi3B+

    My install notes are as follows (for what they are worth)

    1. Install MariaDB

    2. I tried to add perl support (apt-get install libbd-mysql-perl but this was evidently installed already with MariaDB)

    3. Create database slimserver and add user to priviledges (slimserver, host any, no password '') (In phpMyAdmin mine looks like this username slimserver hostname localhost password no global priviledges USAGE Grant No)

    4. Set himemory off in Web browser (Settings/Advanced/Performance/Database Memory Config = Normal)

    5. STOP LMS (sudo service logitechmediaserver stop)

    6. edit server.prefs in var/lib/squeezeboxserver/prefs as follows:-

    dbhighmem: 0
    dbpassword: ''
    dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=sl imserver
    dbtype: MySQL
    dbusername: slimserver

    (I presume, but don't know, that dbsource is the place to specify the url of the db location if not on local host, IP address maybe?)

    7. Start LMS

    Jerry
    Thanks for the above. It almost worked. I too am not an expert.

    When I restarted LMS, the tables were all created

    Code:
    mysql> show tables;
    +----------------------+
    | Tables_in_slimserver |
    +----------------------+
    | albums               |
    | comments             |
    | contributor_album    |
    | contributor_track    |
    | contributors         |
    | dbix_migration       |
    | genre_track          |
    | genres               |
    | metainformation      |
    | playlist_track       |
    | pluginversion        |
    | progress             |
    | rescans              |
    | scanned_files        |
    | tracks               |
    | tracks_persistent    |
    | unreadable_tracks    |
    | years                |
    +----------------------+
    18 rows in set (0.00 sec)
    LMS was apparently running, but I couldn't access the GUI in a browser. MySQL was definitely doing something, and there were a lot of writes to the volume containing the database, but no reads from the volume containing the music files (i.e. no sign of bulk reads). The tables remain empty. What seems to be happening is that the tracks table is being deleted and recreated.

    The relevant part of my server.prefs file is below:
    Code:
    dbhighmem: '0'
    dbjournalsize: 50
    dbpassword: xxxxxxx
    dbsource: dbi:mysql:database=slimserver
    dbtype: MySQL
    dbusername: slimserver
    I've switched back to SQLite for the moment. Any ideas what I missed?

  7. #7
    Quote Originally Posted by dagadog View Post
    Thanks for the above. It almost worked. I too am not an expert.

    When I restarted LMS, the tables were all created

    Code:
    mysql> show tables;
    +----------------------+
    | Tables_in_slimserver |
    +----------------------+
    | albums               |
    | comments             |
    | contributor_album    |
    | contributor_track    |
    | contributors         |
    | dbix_migration       |
    | genre_track          |
    | genres               |
    | metainformation      |
    | playlist_track       |
    | pluginversion        |
    | progress             |
    | rescans              |
    | scanned_files        |
    | tracks               |
    | tracks_persistent    |
    | unreadable_tracks    |
    | years                |
    +----------------------+
    18 rows in set (0.00 sec)
    LMS was apparently running, but I couldn't access the GUI in a browser. MySQL was definitely doing something, and there were a lot of writes to the volume containing the database, but no reads from the volume containing the music files (i.e. no sign of bulk reads). The tables remain empty. What seems to be happening is that the tracks table is being deleted and recreated.

    The relevant part of my server.prefs file is below:
    Code:
    dbhighmem: '0'
    dbjournalsize: 50
    dbpassword: xxxxxxx
    dbsource: dbi:mysql:database=slimserver
    dbtype: MySQL
    dbusername: slimserver
    I've switched back to SQLite for the moment. Any ideas what I missed?
    Hi,

    Sorry, this is above my pay-grade. Maybe the server is starting a scan automatically and perhaps getting stuck in a loop and so not responding to the web interface? Permissions issue? Sounds like this may be server-log territory which might as well be written in Linear B as far as I am concerned. Maybe Michael, or some of the other very knowledgeable people here could help you?

    Hope you get it sorted.

    Jerry

  8. #8
    Thanks, I do to, although to be honest it probably doesn't matter that much in anything other than concept.

    I'm pretty sure it wasn't doing a scan because of the (complete) lack of reads from the volume with the music on. I think it is more likely to be a MySQL server setting (either default or something I've changed). I'll try again when I've switched to MariaDB.

  9. #9
    Quote Originally Posted by dagadog View Post
    Thanks, I do to, although to be honest it probably doesn't matter that much in anything other than concept.

    I'm pretty sure it wasn't doing a scan because of the (complete) lack of reads from the volume with the music on. I think it is more likely to be a MySQL server setting (either default or something I've changed). I'll try again when I've switched to MariaDB.

    OK,
    Let me know if you can't get it working. I have a spare pi and will do a complete re-install, documenting it properly this time! I would like to get his properly nailed down to save myself hassle and embarassment in the future.

    My only reason for preferring to use MYSQL is that I use it for many other applications and don't want to have to be running SQLite just for the music streaming.

  10. #10
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,014

    Pi3B+, Pi3B and MYSQL

    > My only reason for preferring to use MYSQL is that I use it for many
    > other applications and don't want to have to be running SQLite just for
    > the music streaming.


    If you think you'd save some memory or other resource: I might have to
    disappoint you. Even if you use MySQL for the library, LMS would still
    use SQLite for the other caches. But then LMS does not "run SQLite" like
    MySQL is running. It's a relatively small embedded library. By using
    MySQL you might even increase the memory usage, as LMS would load the
    MySQL libraries in addition to the SQLite libraries.

    --

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •