MySQL/Setting up MySQL: Difference between revisions
< MySQL
Jump to navigation
Jump to search
Mildenhall (talk | contribs) |
(Remove outdated info, add message for recommended versions) |
||
Line 9: | Line 9: | ||
MySQL can be installed on just about every major OS: | MySQL can be installed on just about every major OS: | ||
{{redv|'''Important:'''| Please use only supported versions of the MySQL or MariaDB server. As of January 2019, this is MySQL in at least version 5.6 or MariaDB in at least version 5.5.}} | |||
=Ubuntu Linux= | =Ubuntu Linux= | ||
'''Ubuntu Linux:''' | '''Ubuntu Linux:''' | ||
#<code>$sudo apt-get install mysql-server</code> ''(see also: https://help.ubuntu.com/ | #<code>$sudo apt-get install mysql-server</code> ''(see also: https://help.ubuntu.com/18.04/serverguide/mysql.html )'' | ||
#Create a password when asked | #Create a password when asked | ||
#To configure MySQL to listen for connections from network hosts, edit ''/etc/mysql/mysql.conf.d/mysqld.cnf'' and change the bind-address directive to the server's IP address: | #To configure MySQL to listen for connections from network hosts, edit ''/etc/mysql/mysql.conf.d/mysqld.cnf'' and change the bind-address directive to the server's IP address: | ||
Line 19: | Line 21: | ||
#*Note: Replace 192.168.0.5 with the appropriate address. | #*Note: Replace 192.168.0.5 with the appropriate address. | ||
#*Note: To allow both local and remote access (i.e. from both the MySQL 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. | #*Note: To allow both local and remote access (i.e. from both the MySQL 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 server. | #Restart your MySQL server. <code>sudo service mysql restart</code> | ||
#Get into the MySQL command line utility: <code>mysql -u root -p</code> | #Get into the MySQL command line utility: <code>mysql -u root -p</code> | ||
#Enter the following commands: | #Enter the following commands: | ||
Line 104: | Line 106: | ||
If you have chocolatey installed run '''choco install mysql''' | If you have chocolatey installed run '''choco install mysql''' | ||
:'''or''' | :'''or''' | ||
#Download a copy of MySQL server from http://dev.mysql.com/downloads/mysql/ | #Download a copy of MySQL server from http://dev.mysql.com/downloads/mysql/ | ||
#Select ''Server only'' | #Select ''Server only'' | ||
#Create a password when asked | #Create a password when asked | ||
Line 123: | Line 125: | ||
:#For Profile, you can leave it as default (everything checked by default) and hit Next | :#For Profile, you can leave it as default (everything checked by default) and hit Next | ||
:#For Name, set it to '''''MySQL''''' or any name that you will know what it is and click Finished | :#For Name, set it to '''''MySQL''''' or any name that you will know what it is and click Finished | ||
== Setup users in MySQL for Kodi clients == | == Setup users in MySQL for Kodi clients == |
Revision as of 08:34, 21 January 2019
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: Don't create the MySQL databases on your server. Simply set up the MySQL server itself, as Kodi will create the specific databases by itself.
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-expiration-policy.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-expiration-policy.html )
MySQL can be installed on just about every major OS:
Important: Please use only supported versions of the MySQL or MariaDB server. As of January 2019, this is MySQL in at least version 5.6 or MariaDB in at least version 5.5.
Next step: | Setting up Kodi |