Cannot configure MySQL via GUI

I acquired my first Vero 4K a few weeks ago, on both the December build and the one posted today, if I enter the MySQL settings via the GUI to point Kodi to my central database, OSMC always tells me that the settings are incomplete, and I have no option but to discard or go back - but everything is correct.

All I can do is copy the system advancedsettings.xml to my userdata directory and append the mysql settings manually. This is a pain as presumably the idea is to avoid the need to do that. Any thoughts?

We need logs to have any chance at getting any meaningful idea as to what’s gone wrong.

I appreciate that, but we’re all busy, and if I need to go hunting for logs for something as rudimentary as entering an IP address (fixed IP of server), port number (3307), username (kodi) and password (kodi), and the GUI does not work, it feels a bit flaky. I run MariaDB 10 on a Synology 416play, everything on the same wired subnet.

The simple instructions I’ve provided should take just a few minutes (likely less than it takes you to re-write your advancedsettings) to follow. Thanks for understanding.

I have seen a similar problem, but without logs from you I can’t tell if it’s the same problem I’ve seen. With logs maybe I can fix the problem.

https://paste.osmc.tv/cemamujije

Thank you for the logs. Did the problem happen just before you created the logs? If so then what I thought was the cause of the bug isn’t :frowning: I’ll have to look at this some more.

I enabled the logging, entered the mysql GUI, configured the same settings I otherwise manually put in my advancedsettings.xml file, and on exiting from the mysql GUI, I get a pop-up saying the settings are incomplete and do I want to go back or discard. After that I submitted the log.

Is the purpose of this GUI to create an advancedsettings.xml file for the user automatically, combining the core OSMC settings with the mysql settings? It seems to be trying to do that, but always fails in my case. So I am copying the core .xml file to my /userdata directory and appending the mysql settings there.

AFAIK it combines the 2 files. Unless you override a setting in your custom xml-file the default settings are used.

Thank you for the confirmation. I didn’t see any errors in your log, so I’m not 100% sure what’s happening. I’m going to make a few changes to the script to see if I can fix it for you as I think I know what the problem is.

Ok, this should be fixed now! Please try it out and let me know.

Hopefully the issue is now addressed with the following commit: Comparing a71b2ff64c86...d058d4f7ee6b · osmc/osmc · GitHub

I’d appreciate it if you could test this and provide feedback before we release this as an update to other users. To test this update:

  1. Login via the command line
  2. Edit the file /etc/apt/sources.list
  3. Add the following line: deb http://apt.osmc.tv stretch-devel main
  4. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  5. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.

Thanks, the MySQL GUI now works. Before applying the patch, I deleted the advancedsettings.xml file from my /userdata directory and the GUI has created a new file with the SQL settings.

However, the file only contains the SQL settings. It does not contain any of the core buffer/readfactor settings. I thought that if there is a personal advancedsettings.xml file, then the core settings would be ignored? If this is not the case, and instead the settings are automatically combined, that’s fine. But if the settings in my /userdata folder now over-write the core settings, that’s a problem, as I am then back to square one and have to combine the setttings manually as before, and everytime there is a new version of OSMC, re-create my /userdata/advancedsettings.xml file. Can you clarify if I still need to copy over the core settings, in which case, the SQL GUI isn’t really helping? Thanks.

You should not have deleted your advancedsettings! When you did that, you lost your custom changes.

Any changes to the system advancedsettings will also have been lost as those are not meant to be customized. Any changes you need to make to advancedsettings should always be made to the local copy.

?? very confused by this. With a clean install of OSMC, there is no /userdata/advancedsettings.xml file? I’m sure I did not see one. Are you saying that a clean install copies over the core file to the /userdata folder and then the GUI appends settings?

to add, the only custom changes were the SQL changes. The other “changes” are OSMC settings to help with buffering.

And if you deleted your advancedsettings, then those changes were lost and you will have to manually add them again.

ok, in which case the MySQL GUI is useless? Here is text I found on the OSMC website about the system-level advancedsettings.xml file. If on entering SQL settings via the GUI, a /userdata version of advancedsettings.xml is created which does NOT contain the system-level settings, then surely the SQL GUI is a vulnerability? The implication of this discussion is that the user must know that they need to rebuild advancedsettings.xml themselves, in which case why bother with the GUI?

Quote:
There is a preset SYSTEM advancedsettings.xml file, that SHOULD NOT be altered by the end user:
It contains specific settings that are included for Kodi on OSMC, and will be overwritten with OSMC updates.
For reference it is located: /usr/share/kodi/system/advancedsettings.xml

If required, a custom USER advancedsettings.xml file can be created/edited in the following location:

/home/osmc/.kodi/userdata/advancedsettings.xml

Note: Any settings contained in the custom user advancedsettings.xml will override the System advancedsettings.xml.

Any changes you make to advancedsettings will be kept. The problem is that you DELETED your version!!!

I have buffer settings in mine and scraping settings and they have survived for years. The only thing the GUI will change are the database settings.

sorry, you’re not addressing the implications of the text I quoted from the OSMC website. With a clean install, does using the MySQL GUI create a /userdata version of advancedsettings.xml that includes the system-level settings? (which I have not deleted).

No, the system level settings are kept. Anything in the user version override the system version. If there are buffer settings in the system version, but not in the local version than the system version will be used. If there are user settings (that the GUI won’t mess with) they will be used.