MySQL/Setting up MySQL: Difference between revisions
< MySQL
Jump to navigation
Jump to search
(→Ubuntu Linux: Added some Notes when using MariaDB) |
|||
(One intermediate revision by the same user not shown) | |||
Line 33: | Line 33: | ||
##Type in: <code>flush privileges;</code> and press return | ##Type in: <code>flush privileges;</code> and press return | ||
#Close out the command line tool with <code>\q</code> | #Close out the command line tool with <code>\q</code> | ||
=Debian Linux= | |||
'''Debian Linux:''' | |||
#Login as root with <code>$ su -</code> | |||
#<code># apt-get install mariadb-server</code> | |||
#To configure MySQL/MariaDB to listen for connections from network hosts, edit ''/etc/mysql/mariadb.conf.d/50-server.cnf'' and change the bind-address directive to the server's IP address: | |||
##from: <code>bind-address = 127.0.0.1</code> | |||
##to: <code>bind-address = 192.168.0.5</code> | |||
#*Note: Replace 192.168.0.5 with the appropriate address. | |||
#*Note: To allow both local and remote access (i.e. from both the MySQL/MariaDB host to itself and also from other clients), either comment out the bind-address using a hash (#) to disable it, or use <code>bind-address = 0.0.0.0</code> to open it completely. | |||
#Restart your MySQL/MariaDB server. <code># systemctl restart mariadb</code> | |||
#Get into the MySQL command line utility: <code># mysql</code> | |||
#Enter the following commands: | |||
##Type in: <code>CREATE USER 'kodi' IDENTIFIED VIA mysql_native_password USING PASSWORD('kodi123#');</code> and press return | |||
##Type in: <code>GRANT ALL ON *.* TO 'kodi';</code> and press return | |||
##Type in: <code>flush privileges;</code> and press return | |||
#Close out the command line tool with <code>exit</code> or <code>\q</code> | |||
#Logout as root with <code># exit</code> | |||
=Arch Linux= | =Arch Linux= |
Latest revision as of 11:32, 5 January 2024
Share libraries w/MySQL, guide: |
MySQL | Setting up MySQL |
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 )
MySQL/MariaDB can be installed on just about every major OS and NAS:
Important: Please use only supported versions of the MySQL or MariaDB server. As of January 2019, this is MySQL in at least version 5.7 or MariaDB in at least version 5.5, but version 10.3+ is recommended.
Next step: | Setting up Kodi |