MySQL/Setting up MySQL: Difference between revisions
< MySQL
Bossanova808 (talk | contribs) |
mNo edit summary |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 7: | Line 7: | ||
{{redv|'''Also:'''| Some versions of MySQL set their passwords to expire by default, '''even the root password'''! If the password expires, Kodi cannot access the database and the TV Series and Movies libraries will disappear.<br /> | {{redv|'''Also:'''| Some versions of MySQL set their passwords to expire by default, '''even the root password'''! If the password expires, Kodi cannot access the database and the TV Series and Movies libraries will disappear.<br /> | ||
To avoid this and/or fix it after it happens, make sure the account's password does not expire. (See: https://dev.mysql.com/doc/refman/5.7/en/password-management.html )}} | To avoid this and/or fix it after it happens, make sure the account's password does not expire. (See: https://dev.mysql.com/doc/refman/5.7/en/password-management.html )}} | ||
'''Version Requirements''' | |||
Recommended:<br /> | |||
The latest LTS (long term support) versions of MySQL or MariaDB, for continuing support and regular bug/security fixes.<br /> | |||
They were MySQL 8.4.x and MariaDB 11.8.x at the time of writing. | |||
Minimum: | |||
{|class="prettytable" | |||
! Kodi version !! MySQL version !! MariaDB version | |||
|- | |||
| style="width:200px; text-align:left;" | Up to v21 - Omega | |||
| style="width:200px; text-align:center;" | 5.6 | |||
| style="width:200px; text-align:center;" | 5.5 | |||
|- | |||
| style="width:200px;" | v22 - Piers (and above) | |||
| style="width:200px; text-align:center;" | 5.7.9 | |||
| style="width:200px; text-align:center;"" | 10.2.5 | |||
|} | |||
MySQL/MariaDB can be installed on just about every major OS and NAS: | MySQL/MariaDB can be installed on just about every major OS and NAS: | ||
=Ubuntu Linux= | =Ubuntu Linux= | ||
| Line 256: | Line 275: | ||
If you don't have one already, create a docker-compose.yaml file. | If you don't have one already, create a docker-compose.yaml file. | ||
Here's an example service definition for a mariadb container using the | Here's an example service definition for a mariadb container using the official MariaDB LTS (Long Term Support) image: | ||
services: | services: | ||
| Line 268: | Line 287: | ||
- /your/host/path/to/mariadb/configuration/files:/config | - /your/host/path/to/mariadb/configuration/files:/config | ||
environment: | environment: | ||
- MYSQL_ROOT_PASSWORD= | - MYSQL_ROOT_PASSWORD=YOUR_MARIADB_ROOT_PASSWORD | ||
- MYSQL_PASSWORD=kodi | - MYSQL_PASSWORD=kodi | ||
- MYSQL_USER=kodi | - MYSQL_USER=kodi | ||
- MARIADB_AUTO_UPGRADE | - MARIADB_AUTO_UPGRADE=1 | ||
restart: unless-stopped | restart: unless-stopped | ||
| Line 277: | Line 296: | ||
<code>sudo docker compose up -d mariadb</code> | <code>sudo docker compose up -d mariadb</code> | ||
On first run this will create a root user with the password you gave in the Docker Compose file. It will also create a user called "kodi" (please note that you can use any username you want - default is usually "kodi" with a password of "kodi"). The kodi user will NOT have appropriate access until you grant the correct privileges. | |||
So, with the container running: | So, with the container running: | ||
| Line 316: | Line 335: | ||
{{Next|[[MySQL/Setting up Kodi|Setting up Kodi]]}} | {{Next|[[MySQL/Setting up Kodi|Setting up Kodi]]}} | ||
{{ | {{updated|22}} | ||
Latest revision as of 16:52, 8 April 2026
|
Share libraries w/MySQL, guide: |
You'll need to choose which of your computers, Kodi devices, or NAS will be the MySQL server. The server needs to be on 24/7 or have wake-on-lan (preferably the former), and needs to have a local static IP. You will probably want the Kodi device that is hosting most or all of your videos and music to also be the MySQL server, but this is not required.
Please Note: Do not manually create the MySQL/MariaDB databases on your database server. Set up the MySQL/MariaDB server, and Kodi will create the specific databases for you.
Also: Some versions of MySQL set their passwords to expire by default, even the root password! If the password expires, Kodi cannot access the database and the TV Series and Movies libraries will disappear.
To avoid this and/or fix it after it happens, make sure the account's password does not expire. (See: https://dev.mysql.com/doc/refman/5.7/en/password-management.html )
To avoid this and/or fix it after it happens, make sure the account's password does not expire. (See: https://dev.mysql.com/doc/refman/5.7/en/password-management.html )
Version Requirements
Recommended:
The latest LTS (long term support) versions of MySQL or MariaDB, for continuing support and regular bug/security fixes.
They were MySQL 8.4.x and MariaDB 11.8.x at the time of writing.
Minimum:
| Kodi version | MySQL version | MariaDB version |
|---|---|---|
| Up to v21 - Omega | 5.6 | 5.5 |
| v22 - Piers (and above) | 5.7.9 | 10.2.5 |
MySQL/MariaDB can be installed on just about every major OS and NAS:
| Next step: | Setting up Kodi |