MySQL/Setting up MySQL: Difference between revisions
< MySQL
Jump to navigation
Jump to search
m (Bot: Automated text replacement (- XBMC + {{name}} )) |
|||
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, {{name}} 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 {{name}} device that is hosting most or all of your videos and music to also be the MySQL server, but this is not required. | ||
{{-}} | {{-}} | ||
Line 26: | Line 26: | ||
=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, {{name}} 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 107: | Line 107: | ||
:#Choose '''''TCP''''' and click OK | :#Choose '''''TCP''''' and click OK | ||
{{Note|If | {{Note|If {{name}} is unable to connect to the MySQL server, returning an error code [1130]:}}<br/> | ||
If this occurs to you, try amending Step 2 above to read <code>GRANT ALL ON *.* TO 'xbmc'@'xxx.xxx.xxx.%';</code> where xxx.xxx.xxx is the first three quadrants of your home network's IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect. | If this occurs to you, try amending Step 2 above to read <code>GRANT ALL ON *.* TO 'xbmc'@'xxx.xxx.xxx.%';</code> where xxx.xxx.xxx is the first three quadrants of your home network's IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect. | ||
Line 136: | Line 136: | ||
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 {{name}} machine later | ||
=== Prepare the jail === | === Prepare the jail === | ||
Line 193: | Line 193: | ||
=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 {{name}} 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 {{name}} uses. This is useful if you plan on using your MySQL server for more than just XBMC, 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 'xbmc'@'%' IDENTIFIED BY 'xbmc';</code> | #<code>GRANT ALL ON `MyMusic%`.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';</code> | ||
#<code>GRANT ALL ON `MyVideos%`.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';</code> | #<code>GRANT ALL ON `MyVideos%`.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';</code> |
Revision as of 01:12, 5 June 2014
Share libraries w/MySQL, guide: |
MySQL | Setting up MySQL |
You'll need to choose which of your computers, XBMC 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 XBMC device that is hosting most or all of your videos and music to also be the MySQL server, but this is not required.
Note: XBMC v13 seems to have fixed the issue with MySQL 5.6, making it safe to use with XBMC.
MySQL can be installed on just about every major OS:
Next step: | Setting up XBMC |