MySQL/Setting up MySQL: Difference between revisions
< MySQL
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
{{:MySQL/Contents}} | {{:MySQL/Contents}} | ||
{{mininav| [[MySQL]] }} | {{mininav| [[MySQL]] }} | ||
You'll need to choose which of your computers, | 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. | ||
{{-}} | {{-}} | ||
{{redv|'''Please Note:'''| Don't create the MySQL databases on your server'''. Simply set up the MySQL server itself, as | {{redv|'''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.}} | ||
MySQL can be installed on just about every major OS: | MySQL can be installed on just about every major OS: | ||
Line 28: | Line 27: | ||
=Arch Linux= | =Arch Linux= | ||
'''Arch Linux:''' | '''Arch Linux:''' | ||
*Please note: Arch, along with many other distributions, has migrated to the faster and more open MariaDB. It is a drop in replacement to MySQL and, thus, | *Please note: Arch, along with many other distributions, has migrated to the faster and more open MariaDB. It is a drop in replacement to MySQL and, thus, Kodi will require no modifications to work with it. | ||
#Install MariaDB: <code>$ sudo pacman -S mariadb</code> | #Install MariaDB: <code>$ sudo pacman -S mariadb</code> | ||
#Start the service: <code>$ sudo systemctl start mysqld</code> | #Start the service: <code>$ sudo systemctl start mysqld</code> | ||
Line 77: | Line 76: | ||
*Alternative guide for Mac OS X: http://forum. | *Alternative guide for Mac OS X: http://forum.kodi.tv/showthread.php?tid=151631 | ||
=Windows= | =Windows= | ||
Line 88: | Line 87: | ||
#Select that you want the database to have network access when prompted during installation. | #Select that you want the database to have network access when prompted during installation. | ||
If you're using a firewall such as the one that's built into Windows, you will need to follow the steps below for the version of windows you installed | If you're using a firewall such as the one that's built into Windows, you will need to follow the steps below for the version of windows you installed Kodi on. | ||
=== Windows 7/8/8.1 Built-in Firewall === | === Windows 7/8/8.1 Built-in Firewall === | ||
: Run the following command in powershell or execute all the steps below. | : Run the following command in powershell or execute all the steps below. | ||
Line 109: | Line 108: | ||
:#Choose '''''TCP''''' and click OK | :#Choose '''''TCP''''' and click OK | ||
== Setup users in MySQL for | == Setup users in MySQL for Kodi clients == | ||
#Open the "MySQL Command Line Client" from the MySQL start menu | #Open the "MySQL Command Line Client" from the MySQL start menu | ||
Line 146: | Line 145: | ||
create a Jail via the FreeNAS webui - if unsure see here http://doc.freenas.org/index.php/Adding_Jails | create a Jail via the FreeNAS webui - if unsure see here http://doc.freenas.org/index.php/Adding_Jails | ||
make a note of the jail IP address shown - you will need this to put in the advancedsettings.xml file on the | make a note of the jail IP address shown - you will need this to put in the advancedsettings.xml file on the Kodi machine later | ||
=== Prepare the jail === | === Prepare the jail === | ||
Line 188: | Line 187: | ||
*<code>mysql_secure_installation</code> | *<code>mysql_secure_installation</code> | ||
=== Configure mysql ready for | === Configure mysql ready for Kodi to use === | ||
type in | type in | ||
Line 203: | Line 202: | ||
=Restricting MySQL access rights= | =Restricting MySQL access rights= | ||
'''Optional:''' '''If you only use the MySQL server for | '''Optional:''' '''If you only use the MySQL server for Kodi and that server has non-critical data on it, then this probably not necessary.''' | ||
For a more secure MySQL installation use these 2 commands to grant permission only to databases | For a more secure MySQL installation use these 2 commands to grant permission only to databases Kodi uses. This is useful if you plan on using your MySQL server for more than just Kodi, or if you're worried about your internal network being exposed and wanting to lock things down more, etc. | ||
#<code>GRANT ALL ON `MyMusic%`.* TO 'kodi'@'%' IDENTIFIED BY 'kodi';</code> | #<code>GRANT ALL ON `MyMusic%`.* TO 'kodi'@'%' IDENTIFIED BY 'kodi';</code> | ||
#<code>GRANT ALL ON `MyVideos%`.* TO 'kodi'@'%' IDENTIFIED BY 'kodi';</code> | #<code>GRANT ALL ON `MyVideos%`.* TO 'kodi'@'%' IDENTIFIED BY 'kodi';</code> | ||
Line 216: | Line 215: | ||
<headertabs /> | <headertabs /> | ||
{{Next|[[MySQL/Setting up | {{Next|[[MySQL/Setting up Kodi|Setting up Kodi]]}} | ||
{{ | {{Helix updated}} |
Revision as of 05:06, 9 March 2015
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.
MySQL can be installed on just about every major OS:
Next step: | Setting up Kodi |