MySQL: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{mininav|[[Syncing and sharing]]}}
{{divbox|orange||<big>'''NOTICE:''' This is considered an advanced (complicated) and experimental feature.</big>}}
{{divbox|orange||<big>'''NOTICE:''' This is considered an advanced (complicated) and experimental feature.</big>}}
{{divbox|red||{{huge|'''NOTICE:''' Every {{kodi}} "client" '''must''' run the same version of {{kodi}}.}}<br />Otherwise they will not be sharing the same library. There can even be differences between [[development builds]], so make sure you always use the same build dates. See '''[[XBMC databases/Version table|Version table]]''' for more info. }}
{{divbox|red||{{huge|'''NOTICE:''' Every {{kodi}} "client" '''must''' run the same version of {{kodi}}.}}<br />Otherwise they will not be sharing the same library. There can even be differences between [[development builds]], so make sure you always use the same build dates. See '''[[Databases#Database_Versions|Version table]]''' for more info. }}
{{:MySQL/Contents}}
{{:MySQL/Contents}}
:''For simple library sharing see: '''[[HOW-TO:Share libraries using UPnP]]'''''
:''For simple library sharing see: '''[[HOW-TO:Share libraries using UPnP]]'''''
Line 8: Line 7:
[[File:Network.png|200px|left]]
[[File:Network.png|200px|left]]
;<big><u>Introduction</u></big>
;<big><u>Introduction</u></big>
<section begin="intro"/>If you have more than one {{kodi}} device on your local network then you might want to synchronize them using a MySQL library. Using a MySQL library allows you to store information about your whole video library in a central database, so that multiple devices can access the same information at the same time.<section end="intro"/>
<section begin="intro"/>If you have more than one {{kodi}} device on your local network then you might want to synchronize them by sharing the Kodi library databases via the MySQL protocol. Using shared library databases allows you to store information for either your video or music library in a central database, so that multiple devices can access the same information at the same time.<section end="intro"/>


This gives you the ability to do things like:
This gives you the ability to do things like:
Line 16: Line 15:
{{-}}
{{-}}


;{{big|Note for v18}}
;{{big|MySQL Protocol & MariaDB}}
<section begin="MariaDB" />As of v18, {{kodi}} has moved to supporting '''''[https://mariadb.org/ MariaDB]''''' instead of MySQL for sharing databases across multiple Kodi client installs, but still using the same MySQL protocol. MariaDB is an Open Source project and is currently one of the world's most popular database servers. It is a fork of MySQL and fully compatible with it.
<section begin="MariaDB" />When setting up shared Library databases either MySQL or Maria DB can be used as they both use the same MySQL protocol. Since many Linux distributions have dropped including MySQL and now instead now ship MariaDB it is being more common to use MariaDB for shared Library databases.<section end="MariaDB" />
 
As updates to MySQL have slowed over recent years, the {{kodi}} Team felt it necessary to seek an alternative or risk encountering issues in the future. An end user of {{kodi}} will not be aware of any changes to the underlying databases.
 
Many Linux distributions have dropped MySQL and ship MariaDB instead. MariaDB also ships with compatibility files that will allow seamless interaction with the existing MySQL database on other platforms. For those users with MySQL shared setup, MariaDB will still be able to connect to the MySQL server.





Revision as of 10:18, 28 February 2018

Share libraries w/MySQL, guide:

  1. Introduction
  2. Setting up MySQL
  3. Setting up Kodi
For simple library sharing see: HOW-TO:Share libraries using UPnP
Network.png
Introduction

If you have more than one Kodi device on your local network then you might want to synchronize them by sharing the Kodi library databases via the MySQL protocol. Using shared library databases allows you to store information for either your video or music library in a central database, so that multiple devices can access the same information at the same time.

This gives you the ability to do things like:

  • Share watched and unwatched status for your media on all devices
  • Stop watching a movie or TV show in one room then finish watching it in another room automatically
  • Only one library to maintain for all devices


MySQL Protocol & MariaDB

When setting up shared Library databases either MySQL or Maria DB can be used as they both use the same MySQL protocol. Since many Linux distributions have dropped including MySQL and now instead now ship MariaDB it is being more common to use MariaDB for shared Library databases.


Next step: Setting up MySQL