Kodi Community Forum
Solved MariaDB on Raspberry Pi, problems connecting to central DB - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Solved MariaDB on Raspberry Pi, problems connecting to central DB (/showthread.php?tid=364928)



MariaDB on Raspberry Pi, problems connecting to central DB - evilscytheman - 2021-10-13

Hello all

i want for several Kodi clients a central DB on my Raspberry Pi via MariaDB. But I'm getting these errors:

html:
2021-10-13 14:45:27.530 T:25420 ERROR <general>: Unable to open database: MyMusic82 [2002](Can't connect to MySQL server on '192.168.178.200' (10061))
2021-10-13 14:45:29.353 T:18996 INFO <general>: CIRServerSuite:Tonguerocess: failed to connect to irss, will keep retrying every 5 seconds
2021-10-13 14:31:13.989 T:14968 ERROR <general>: Unable to open database: MyMusic81 [2002](Can't connect to MySQL server on '192.168.178.200' (10061))
.
.
.
2021-10-13 14:47:11.015 T:25420 ERROR <general>: Unable to create new database
2021-10-13 14:47:13.049 T:25420 ERROR <general>: Unable to open database: MyVideos119 [2002](Can't connect to MySQL server on '192.168.178.200' (10061))
.
.
.
2021-10-13 14:48:44.367 T:25420 ERROR <general>: Unable to create new database

What I've done:
Installed MariaDB on Raspi. Created user via:

sql:
CREATE USER 'kodi'@'%' IDENTIFIED BY 'kodi';
GRANT ALL PRIVILEGES ON *.* TO 'kodi'@'%':
FLUSH PRIVILEGES;

User should have all rights and not only local, right?

I changed the my.cnf file in /etc/mysql/:

xml:

[client-server]
port=3306

So the port should work as well.


My advancedsettings.xml:

xml:
<advancedsettings>
    <musicdatabase> 
        <type>mysql</type> 
        <host>192.168.178.200</host> 
        <port>3306</port> 
        <user>kodi</user> 
        <pass>songoku</pass> 
    </musicdatabase> 
    <videodatabase>
        <type>mysql</type>
        <host>192.168.178.200</host>
        <port>3306</port>
        <user>kodi</user>
        <pass>songoku</pass>
    </videodatabase> 
    <videolibrary>
        <importwatchedstate>true</importwatchedstate>
        <importresumepoint>true</importresumepoint>
    </videolibrary>
</advancedsettings>

What did I do wrong? Any hints?

Thanks in advance. BR!


RE: MariaDB on Raspberry Pi, problems connecting to central DB - ponkotsu - 2021-10-13

Stab in the dark..
In my.cnf, did you comment out
Code:
bind-address = 127.0.0.1
or set it to 192.168.178.200 or 0.0.0.0?


RE: MariaDB on Raspberry Pi, problems connecting to central DB - evilscytheman - 2021-10-13

(2021-10-13, 16:28)ponkotsu Wrote: Stab in the dark..
In my.cnf, did you comment out
Code:
bind-address = 127.0.0.1
or set it to 192.168.178.200 or 0.0.0.0?

At the moment the complete my.cnf looks like this:
Image


RE: MariaDB on Raspberry Pi, problems connecting to central DB - evilscytheman - 2021-10-13

(2021-10-13, 16:34)evilscytheman Wrote:
(2021-10-13, 16:28)ponkotsu Wrote: Stab in the dark..
In my.cnf, did you comment out
Code:
bind-address = 127.0.0.1
or set it to 192.168.178.200 or 0.0.0.0?

At the moment the complete my.cnf looks like this:
Image

This german tutorial did the trick.

There still was a binding to localhost in the " /etc/mysql/mariadb.conf.d/50-server.cnf"
the my.cnf seems not a complete overview.

Thanks all for the hints


MariaDB on Raspberry Pi, problems connecting to central DB - Klojum - 2021-10-13

Thread marked solved.