Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Kodi MySQL:

MySQL Setup:

sudo apt-get update
sudo apt-get install -y mariadb-server mariadb-client
cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep bind
sed -i -e 's|127.0.0.1|0.0.0.0|g' /etc/mysql/mariadb.conf.d/50-server.cnf
cat /etc/mysql/mariadb.conf.d/50-server.cnf | grep bind
systemctl restart mysql
systemctl status mysql
CREATE USER 'kodi' IDENTIFIED BY 'kodi';
GRANT ALL ON *.* TO 'kodi';
flush privileges;
exit;

 

Kodi Setup:

Note: The way it works is whatever Kodi you do initial setup is sort of a master, its the only one that can "change" paths for Videos or your stuck starting fresh by deleting DB's and creating new "master"...SO, I Install Kodi on the same VM as SQL and leave it as the "master" Kodi Server.

  • Install Kodi
  • Configure AdvancedSettings.xml (Replace IP)
cat <<'EOF'> ~/.kodi/userdata/advancedsettings.xml 
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.XYZ</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase> 
<musicdatabase>
<type>mysql</type>
<host>192.168.1.XYZ</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>
EOF
  • Add Media to Kodi

Notes:

Even if the media is on the same computer as one of the Kodi instances, you MUST use a network share path. You cannot use a local file path with MySQL.

Adding New Clients:

  • Just create/copy advancedsettings.xml on the new Kodi Installation in userdata and restart Kodi
  • No labels

2 Comments

  1. Note: Kodi SQL Server can't be a newer version of Kodi than client!