(2018-07-22, 02:35)Ou812_2018 Wrote: [ -> ]...
When I set up mysql on the ubuntu server (fresh install of linux), I edited the /etc/mysql/mysql.conf.d/mysqld.cnf with bind-address 127.0.0.1 and bind-address 192.168.0.141. I also setup a user account on mysql with username/password kodi/kodi.
If these bind addresses are the one the server ist listening for new connections I think this is misconfigured, they should be 127.0.0.1 for localhost and 192.168.0.252 for the actual network interface used by the server. But the last time I actually configured such server is about 15 years back, so I can't provide much help here. My MariaDB-Server comes with the QNAP-NAS unit I am using and here I just needed to activate the SQL-Server and accept remote-connections on port 3306.
But once you can connect it like Klojum said, here are the steps I am using to access my Shields to editing the config:
At first you'll need to activate the Android Debug Bridge (ADB) on the shield, that ones is used to access it remotely from your descktop.
The following steps are on the Shield:
Enable debugging
1. Goto Settings
2. Go across to About in Device
3. Go down to Build and click on it 10times until it says you are in development mode
ADB over USB
1. Make sure you have performed the above steps "Enable debugging"
2. Goto Settings
3. Go Across to Developer options
4. Go down to Debugging
5. Toggle USB debugging to On
ADB over Network
1. Make sure you have performed the above steps "Enable debugging"
2. Make sure you have performed the above steps "ADB over USB"
3. Toggle Network debugging to On
For the next part you'll need to install the Android Debug Bridge on your decktop. I'm using that on Windows, but it's available on Ubuntu as well here are two links for download (and some instructions):
https://www.linuxbabe.com/ubuntu/how-to-...6-10-14-04
https://forum.xda-developers.com/showthr...?t=2317790
Once you connected to your shield using the following command and authorizing the access as shown in the ubuntu link you can start editing the advancedsettings.xml.
adb connect 192.168.0.141
To use the MySQL/MariaDB database for Vidieo or Music-Database the advancedsettings.xml needs to contain the following part, with your config (as far as provides; I'm not sure about the port):
xml:
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.0.252</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.0.252</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</musicdatabase>
</advancedsettings>
Save this file some where, for the following ADB commands I assume them on K:\ on Windows.
To get this on your shield you need to use the push command of adb, like
adb push "K:\advancedsettings.xml" /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml
Thats basically all you need to get Kodi to use MySQL/MariaDB for your library. Once you start Kodi after that, it will connect to your MySQL/MariaDB and create the database MyVideosNNN (NNN being the version number depending on your Kodi Version, somewhere around 109 at the moment, I think). So your user kodi need the right to create new databases, by the way.
For the adb command the path used on the shield (or any other device) depends on some different things, here are some I had to use so far:
Shield Pro, local Kodi install:
/sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml
Amazon FireTV on SDCard:
/storage/sdcard1/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml
Amazon FireTV on SDCard:
/sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/advancedsettings.xml
You can determine the one needed with; you'll need to find the
org.xbmc.kodi -folder
adb shell
cd
ls
To get ths to work on all three Shields you need to use the same Kodi-version on all three of them, as the used database depends on that.
The same way I'm configuring the sources.xml and passwords.xml, but that may be a bit off topic here.
Holger
PS: Can someone explain how to get this Code-Tag to work? When I used it here only the whole text changed, despite selected Text. So I used the italic script instead.