Impossible to enable MySQL

Hi,

I’m testing osmc 18.rc2 with my vero 4k+ and i can’t enable Mysql like u der osmc 17…

How résolve this bug ?

Rgds
Akhlan

You can edit the advancedsettings.xml directly

ssh osmc@osmc.local
cd /home/osmc/.kode/userdata/
pico advancedsettings.xml

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings>
        <videodatabase>
                <name>xbmc_video</name>
                <host>192.168.0.210</host>
                <user>xbmc</user>
                <pass>xbmc</pass>
                <type>mysql</type>
                <port>3306</port>
        </videodatabase>
</advancedsettings>

Already done (on port 3307 because i’m under MariaDB 10) but same issue…

Hi,

I think there known issues with myosmc with kodi 18 testing release builds. Is the connection to the mariadb database not working aswell?

if so please provide debug logs.

Thanks Tom.

I’ll do that tomorow :wink:

Did you try port 3306? I’ve installed MariaDB, and it has always defaulted to 3306, not 3307.

Where is the database installed? On the Vero or another system?

From the Vero, you can test the connection like this:

telnet ip.of.db.server 3306 

(or 3307)

It’s MariaDB 10 under my Nas Synology.

Ok, so did you try what I suggested, telnet to port 3307?

I don’t authorized telnet on my NAS

[ iMac ~ ] telnet -l osmc 192.168.35.35 3307
Trying 192.168.35.35...
Connected to 192.168.35.35.
Escape character is '^]'.
HHost '192.168.35.10' is not allowed to connect to this MariaDB serverConnection closed by foreign host.
<?xml version="1.0" encoding="utf-8"?>
<advancedsettings>
        <videolibrary>
                <importwatchedstate>true</importwatchedstate>
                <importresumepoint>true</importresumepoint>
        </videolibrary>
        <videodatabase>
                <name>MyVideos</name>
                <host>192.168.35.35</host>
                <user>osmc</user>
                <pass>***************</pass>
                <type>mysql</type>
                <port>3307</port>
        </videodatabase>
        <musicdatabase>
                <name>MyMusic</type>
                <host>192.168.35.35</host>
                <user>osmc</user>
                <pass>****************</pass>
                <type>mysql</type>
                <port>3307</port>
   </musicdatabase>
</advancedsettings>

This is not telnet (port), but using telnet client to connect to MariaDB port

As you can see on the reply of the command your NAS is blocking connections from 192.168.35.10

I wasn’t aware that this was still an issue.
Can others reproduce?

I reproduced this issue on 2 device, on Vero 4K and on Rpi3

I previous posted I had problems with it, but I just checked to be sure, but I got it running with MariaDB 10 on port 3307.
My kodi devices are over 4 different devices, Vero 4K, RPi2, Shield and a PC all connecting to the same DB.

I never used the GUI for this, but advancedsettings.xml should just work like @tor.gunnar.berland posted before.

It’s because it appears to be your NAS that’s refusing the connection, so this will happen on all clients. You need to fix the NAS to accept remote connections first.

We are looking in to the issue which prevents configuring MySQL via My OSMC -> Network; but for now you can configure this via advancedsettings.xml as other users have suggested.

Sam

I have create an advancedsetting.xml file but unable to work with sql :frowning:

~/.kodi/userdata** $ ls -al
-rw-r–r-- 1 root root 825 avril 24 12:52 advancedsettings.xml

<advancedsettings>         
        <loglevel hide="true">1</loglevel>
        <videolibrary>                    
                <importwatchedstate>true</importwatchedstate>
                <importresumepoint>true</importresumepoint>  
        </videolibrary>                                    
        <videodatabase>
                <name>MyVideos</name>
                <host>192.168.35.35</host>
                <user>osmc</user>         
                <pass>same password like OSMC SQL User</pass>
                <type>mysql</type>         
                <port>3307</port> 
        </videodatabase>         
        <musicdatabase> 
                <name>MyMusic</type>
                <host>192.168.35.35</host>
                <user>osmc</user>         
                <pass>same password like OSMC SQL User</pass>
                <type>mysql</type>         
                <port>3307</port> 
        </musicdatabase>         
</advancedsettings>     




and my database MyVideosxx ans MyMusicxx don’t exist, why ?

Rgds
Akhlan

Did you correct the NAS configuration?

I just upgrade Maria5 to Maria10, i think (but i’m not sure ay 100%) all is ok

192.168.35.10 is my Mac, normal my NAS block connections :wink:

From your settings it shows you only granted osmc access from localhost.

Here is guide from the Kodi wiki: MySQL - Official Kodi Wiki

Some examples from my config: