<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scsa20</id>
	<title>Official Kodi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Scsa20"/>
	<link rel="alternate" type="text/html" href="https://kodi.wiki/view/Special:Contributions/Scsa20"/>
	<updated>2026-06-29T05:19:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://kodi.wiki/index.php?title=Talk:MySQL&amp;diff=67454</id>
		<title>Talk:MySQL</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Talk:MySQL&amp;diff=67454"/>
		<updated>2014-01-05T10:16:08Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: /* Windows Firewall Rules */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NAS how-to link dump ==&lt;br /&gt;
&lt;br /&gt;
Dumping some urls that might be usable or be a base for how-to&#039;s on mysql on NAS&#039;s. -- [[User:Ned Scott|Ned Scott]] 04:37, 15 November 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
*http://humphrey.za.net/2010/09/25/xbmc-mysql-multi-room-sync/&lt;br /&gt;
&lt;br /&gt;
== Other useful links ==&lt;br /&gt;
&lt;br /&gt;
Some more links to look into. -- [[User:Ned Scott|Ned Scott]] 20:55, 15 November 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
*http://lifehacker.com/5634515/how-to-synchronize-your-xbmc-media-center-across-every-room-in-the-house&lt;br /&gt;
*http://xbmcstuff.bossanova808.net/2011/03/summary-of-xbmc-mysql-database.html&lt;br /&gt;
&lt;br /&gt;
== A couple of comments ==&lt;br /&gt;
&lt;br /&gt;
Ubuntu users can install MySQL from official Ubuntu repos using apt-get: https://help.ubuntu.com/10.04/serverguide/C/mysql.html&lt;br /&gt;
&lt;br /&gt;
Also, the top of the article has a note mentioning that the latest pre-Eden nightly is required. What specific steps in the article does this apply to, and are there alternative steps applicable to the latest stable release (Dharma 10.1 at the time of this writing)?&lt;br /&gt;
&lt;br /&gt;
Lastly, the scottbrant.net/?p=495 link in the article is not working for me.&lt;br /&gt;
&lt;br /&gt;
Update: I also got access denied errors in the MySQL log while trying to import my XBMC database into it. I think there&#039;s a missing step in the article for setting the MySQL &#039;xbmc&#039; user password. The MythTV wiki has some troubleshooting info on setting passwords that helped: http://www.mythtv.org/wiki/Category:MySQL&lt;br /&gt;
&lt;br /&gt;
--[[User:HunterZ|HunterZ]] 14:42, 11 December 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
:Added your links. Eventually we&#039;ll have a more general MySQL page for troubleshooting and more advanced setups, but I still put in the mythtv link in the &amp;quot;see also&amp;quot; section for the time being. &amp;quot;&amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&amp;quot; should create the password. The password is what IDENTIFIED BY sets.&lt;br /&gt;
&lt;br /&gt;
:Pathsub for thumbs requires pre-Eden, but most of the MySQL setup will still work for Dharma, but you might need to manually create the &amp;quot;xbmc_video&amp;quot; and &amp;quot;xbmc_music&amp;quot; databases (Eden will create databases if missing).&lt;br /&gt;
&lt;br /&gt;
:The scottbrant.net link has now been replaced with a link to http://xbmcstuff.bossanova808.net/2011/03/summary-of-xbmc-mysql-database.html?m=1 which has more settings and further discussion on speeding up mysql.&lt;br /&gt;
&lt;br /&gt;
:Thanks for the links and let us know if you have any other feedback/ideas/whatever! -- [[User:Ned Scott|Ned Scott]] 22:52, 11 December 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Someone should make a note that the Pre-Eden builds do NOT like it if you create the xbmc_video and xbmc_music databases in advance. &lt;br /&gt;
&lt;br /&gt;
:Add them to your advancedsettings.xml but DO NOT CREATE them when installing and configuring MySql or your initial set up will fail. If you have already created them, or you are upgrading from an earlier version of XBMC that did not have this problem, just use a DIFFERENT database name in your advancedsettings.xml, or DROP the two fresh databases if you are installing from scratch. &lt;br /&gt;
&lt;br /&gt;
:If upgrading from an earlier version, export your library before upgrading, then import it once everything is set up again on the new version. I just spent about 10 hours tracking down this elusive piece of information, so hopefully this helps someone else. I know for sure that this affects all nightlies from 12/9/2011 and on, could very easily be an issue going back for months as far as I know. This may change, so try the &amp;quot;old&amp;quot; way first and if it fails (check your log) then simply drop those two databases (unless upgrading and you don&#039;t have a backup already!) &lt;br /&gt;
&lt;br /&gt;
:As I just registered here for the purpose of sharing this info, I put it here rather than in the actual guide as I am not entirely familiar with the rules yet and don&#039;t want to step on any toes right off the bat! [[User:J114|J114]] 02:32, 15 December 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
::will put a warning note in there, but hopefully that&#039;s a bug that will be fixed by Eden&#039;s release. -- [[User:Ned Scott|Ned Scott]] 02:37, 15 December 2011 (EST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On my win 7 PC, sharing thumbnails caused hangs/freezes, removing the path substitution from advancedsettings.xml fixed the problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;ve shared my whole profile directories between my HTPC and my iPad. Of course, I do not want the same guisettings... I tried the following (in advancedsettings.xml on my iPad) and it works to share anything regarding profile (mySQL config, Thumbnails, etc) *except* guisettings.xml (with a dedicated shared guisetting_iPad.xml file instead)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;!-- profiles for iPad: everything except guisettings  --&amp;gt;&lt;br /&gt;
       &amp;lt;substitute&amp;gt;&lt;br /&gt;
          &amp;lt;from&amp;gt;special://masterprofile/profiles/Olivier/guisettings.xml&amp;lt;/from&amp;gt;&lt;br /&gt;
          &amp;lt;to&amp;gt;nfs://SHARE/userdata/profiles/Olivier/guisettings_iPad.xml&amp;lt;/to&amp;gt;&lt;br /&gt;
        &amp;lt;/substitute&amp;gt;    &lt;br /&gt;
       &amp;lt;substitute&amp;gt;&lt;br /&gt;
          &amp;lt;from&amp;gt;special://masterprofile/profiles/Olivier&amp;lt;/from&amp;gt;&lt;br /&gt;
          &amp;lt;to&amp;gt;nfs://SHARE/userdata/profiles/Olivier&amp;lt;/to&amp;gt;&lt;br /&gt;
        &amp;lt;/substitute&amp;gt;    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[User:Frofpa|Frofpa]] 04:08, 9 April 2012 (EDT)&lt;br /&gt;
&lt;br /&gt;
::That is a very bad idea, as it will share things that should not be shared, such as the database files. -- [[User:Ned Scott|Ned Scott]] 04:50, 9 April 2012 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Restricted privileges ==&lt;br /&gt;
&lt;br /&gt;
If you are using your database for something other than XBMC, it may be better to restrict privileges, in case a bad add-on manages to do a DROP with the xbmc user.&lt;br /&gt;
&lt;br /&gt;
Using this instead of the &amp;quot;*.*&amp;quot; line makes XBMC only access/create its own databases:&lt;br /&gt;
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO &#039;xbmc&#039;@&#039;192.168.1.%&#039;;&lt;br /&gt;
&lt;br /&gt;
(Source: http://forum.xbmc.org/showthread.php?tid=114017 ) [[User:Michelv|Michelv]] 14:20, 23 June 2012 (EDT) Michelv&lt;br /&gt;
&lt;br /&gt;
== Path substitution causes duplicate entries ==&lt;br /&gt;
&lt;br /&gt;
The path substitution step listed in the article is problematic. I&#039;m trying to use it now to access my video files via an OS mount instead of the smb:// paths that are currently stored in the database, and it&#039;s resulting in duplicate entries on the next library update: http://forum.xbmc.org/showthread.php?tid=140536&lt;br /&gt;
--[[User:HunterZ|HunterZ]] 21:44, 14 September 2012 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Path subs alone cannot create duplicates, as it only takes a source and points it to a different location. There would still only be one source. You only get duplicates if you have more than one source that is pointing to the same files. -- [[User:Ned Scott|Ned Scott]] 02:58, 15 September 2012 (EDT)&lt;br /&gt;
&lt;br /&gt;
:What may have happened here is that you scanned your sources and the video files were enter into your db through the smb path. Then you added the path substitution and scanned your sources again. The substitution causes the same video files to have different paths and they get enter into your db through this new path as well. And since the old smb path is still valid, the old entries are not removed. I&#039;ve had this happen when I switched from using NetBIOS name to ip address in &amp;quot;smb://&amp;quot; sources. I found the easiest way to get rid of the old (&amp;quot;smb://netbios-name/...&amp;quot;) files was to change the name of the machine to something else, so these paths are no longer valid, clean up the db and then change the name of machine back. [[User:SkyLined|SkyLined]] 08:44, 24 May 2013 (EDT)&lt;br /&gt;
&lt;br /&gt;
== MariaDB ==&lt;br /&gt;
&lt;br /&gt;
MariaDB works as a drop in replacement to MySQL and it&#039;s a bit faster. Should it be added to this page or be placed on its own separate page? (The instructions require a PPA be used in Ubuntu so they are a bit more complicated. Also, upgrading from MySQL has to be covered as well. [[User:Ivanmmj|Ivanmmj]] 12:46, 24 January 2013 (EST)&lt;br /&gt;
&lt;br /&gt;
== MySQL connection errors at start-up ==&lt;br /&gt;
&lt;br /&gt;
Note:  This issue is related to XBMC running on Raspberry PI using OpenElec&lt;br /&gt;
&lt;br /&gt;
I just spent several hours debugging strange behavior in XBMC after migrating to MySQL.  The strange behavior revolved around certain featured disappearing after reboot, such as the Movie tab on the home screen and under Videos.  Also if you right clicked a movie you no longer had all the selection like &amp;quot;Movie Information&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
So after reviewing the logs under &amp;lt;HOME&amp;gt;/.xbmc/temp I noticed errors connecting to the DB and the art share.  It appears there is a problem in the timing between the network interface and when XBMC looks for the shares or tries to connect to the DB.&lt;br /&gt;
&lt;br /&gt;
So I decided to mess around with autostart.sh which executes before XBMC starts and pre-mount the two servers needed for these connections.  That too was frustrating.  Turns out when the autostart script executes the mount command the network interface has not yet been started.  So to solve the problem I had to add a ifconfig up eth0 &amp;lt;ipaddress&amp;gt;.  This solved the problem and XBMC now starts without issues.&lt;br /&gt;
&lt;br /&gt;
So after thinking about Ned&#039;s point below I decided that the only think I need to do during autostart.sh execution is to start the network interface&lt;br /&gt;
&lt;br /&gt;
: #!/bin/sh&lt;br /&gt;
: #set -x&lt;br /&gt;
:echo &amp;quot;===== Start $0 =====&amp;quot;&lt;br /&gt;
:ifconfig&lt;br /&gt;
:ifconfig eth0 up &amp;lt;your IP address&amp;gt;&lt;br /&gt;
:ifconfig&lt;br /&gt;
:route&lt;br /&gt;
:echo &amp;quot;===== End $0 =====&amp;quot;&lt;br /&gt;
:sleep 5&lt;br /&gt;
:exit&lt;br /&gt;
&lt;br /&gt;
[[User:Jpgeek|Jpgeek]] 13:57, 30 April 2013 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Thanks for the heads up, but I think most users would not be mounting their shares on the OS level, but instead having XBMC take care of connecting to the shares? -- [[User:Ned Scott|Ned Scott]] 14:02, 30 April 2013 (EDT)&lt;br /&gt;
&lt;br /&gt;
:Good point, and I guess I don&#039;t need to mount anything just make sure the network interface is up.  This is probably not an issue on a standard XBMC installation, it appears to be a startup synchronization problem on OpenElec and an appliance like Raspberry PI.  [[User:Jpgeek|Jpgeek]] 16:14, 30 April 2013 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Alternative to export/import ==&lt;br /&gt;
&lt;br /&gt;
I have an alternative to exporting/importing that I find to be easier to use and explain. I developed it after I ran into a few issues with a Windows server hosting my media which I resolved by using its IP address, rather than its NetBIOS name and providing a valid user in &amp;quot;passwords.xml&amp;quot;, even though I was sharing my media without username/password. I am not entirely sure what the root cause of my issues was. I was getting errors on my Android and Raspberry PI devices but not on my Windows laptop, so I assumed it had to do with the smb implementation on *nix machines wasn&#039;t working as expected. The sync seemed to work fine on all my devices as I could see all the media files in my library, but when I wanted to play something on the *nix based devices, I got an error saying that &amp;quot;the file is no longer available&amp;quot; and would I want to remove it from the library? I never bothered to check my log files, so I can&#039;t tell you more about it.&lt;br /&gt;
&lt;br /&gt;
Anyway, rather than export and import the media database in xbmc, you will need to create/copy two additional files (sources.xml and passwords.xml, in addition to advancedsettings.xml) in/to the userdata folder of any device you want to sync. If others agree that this is easier than exporting and importing the database we should update the HOW-TO.&lt;br /&gt;
&lt;br /&gt;
===advancedsettings.xml===&lt;br /&gt;
Create advancedsettings.xml as described in the HOW-TO&lt;br /&gt;
===sources.xml===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;sources&amp;gt;&lt;br /&gt;
    &amp;lt;programs&amp;gt;&lt;br /&gt;
        &amp;lt;default pathversion=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/default&amp;gt;&lt;br /&gt;
    &amp;lt;/programs&amp;gt;&lt;br /&gt;
    &amp;lt;video&amp;gt;&lt;br /&gt;
        &amp;lt;default pathversion=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/default&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;name&amp;gt;Movies&amp;lt;/name&amp;gt;&lt;br /&gt;
            &amp;lt;path pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://192.168.0.1/Shares/Movies&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;name&amp;gt;TV Shows&amp;lt;/name&amp;gt;&lt;br /&gt;
            &amp;lt;path pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://192.168.0.1/Shares/TV Shows&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &amp;lt;/video&amp;gt;&lt;br /&gt;
    &amp;lt;music&amp;gt;&lt;br /&gt;
        &amp;lt;default pathversion=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/default&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;name&amp;gt;Music&amp;lt;/name&amp;gt;&lt;br /&gt;
            &amp;lt;path pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://192.168.0.1/Shares/Music&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &amp;lt;/music&amp;gt;&lt;br /&gt;
    &amp;lt;pictures&amp;gt;&lt;br /&gt;
        &amp;lt;default pathversion=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/default&amp;gt;&lt;br /&gt;
        &amp;lt;source&amp;gt;&lt;br /&gt;
            &amp;lt;name&amp;gt;Pictures&amp;lt;/name&amp;gt;&lt;br /&gt;
            &amp;lt;path pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://192.168.0.1/Shares/Pictures&amp;lt;/path&amp;gt;&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &amp;lt;/pictures&amp;gt;&lt;br /&gt;
    &amp;lt;files&amp;gt;&lt;br /&gt;
        &amp;lt;default pathversion=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;/default&amp;gt;&lt;br /&gt;
    &amp;lt;/files&amp;gt;&lt;br /&gt;
&amp;lt;/sources&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&#039;&#039;Obviously, you&#039;ll need to replace &amp;quot;smb://192.168.0.1/Shares/...&amp;quot; with the relevant path in your setup.&#039;&#039;&lt;br /&gt;
{{Note|Use a static IP address for your media server and not &amp;quot;smb://MediaServer/...&amp;quot;, as NetBIOS names may give problems on some devices.}}&lt;br /&gt;
{{Note|Remote paths should not include a username/password, even if you use one, as these are specified in passwords.xml}}&amp;lt;/p&amp;gt;&lt;br /&gt;
===passwords.xml===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;passwords&amp;gt;&lt;br /&gt;
    &amp;lt;path&amp;gt;&lt;br /&gt;
        &amp;lt;from pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://192.168.0.1/&amp;lt;/from&amp;gt;&lt;br /&gt;
        &amp;lt;to pathversion=&amp;quot;1&amp;quot;&amp;gt;smb://username:password@192.168.0.1/&amp;lt;/to&amp;gt;&lt;br /&gt;
    &amp;lt;/path&amp;gt;&lt;br /&gt;
&amp;lt;/passwords&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&#039;&#039;Again, you&#039;ll need to replace &amp;quot;smb://192.168.0.1/&amp;quot; with the relevant path in your setup.&#039;&#039;&lt;br /&gt;
{{Note|When using an smb that is not protected with a username and password and you are getting errors when you want to playback files, you will need to supply a username:password that is valid on the server. If your user does not have a password, you can just provide the username as in &amp;quot;smb://username@192.168.0.1&amp;quot;.}}&lt;br /&gt;
&lt;br /&gt;
All three files go in the same location in the userdata folder. Restart XBMC and you&#039;re done! [[User:SkyLined|SkyLined]] 09:30, 24 May 2013 (EDT)&lt;br /&gt;
&lt;br /&gt;
== Windows Firewall Rules ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve updated the Windows section about the Windows Firewall. There is no need to use UDP since MySQL only talks on TCP. Also there&#039;s no need to set up an outbound rule since you only need it for incoming traffic to get the data so why bother covering it with rules that&#039;s not needed and possibly open yourself to nasty stuff? [[User:Scsa20|Scsa20]] ([[User talk:Scsa20|talk]]) 05:16, 5 January 2014 (EST)&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=MySQL/Setting_up_MySQL&amp;diff=67453</id>
		<title>MySQL/Setting up MySQL</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=MySQL/Setting_up_MySQL&amp;diff=67453"/>
		<updated>2014-01-05T10:10:12Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: /* Windows */ updated firewall rules information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Frodo updated}}{{:HOW-TO:Sync multiple libraries/Contents}}&lt;br /&gt;
You&#039;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.&lt;br /&gt;
{{-}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;{{notice|Users are reporting issues with &#039;&#039;&#039;MySQL 5.6&#039;&#039;&#039;. Use &#039;&#039;&#039;MySQL 5.5&#039;&#039;&#039; instead.}}&amp;lt;/big&amp;gt;&lt;br /&gt;
MySQL can be installed on just about every major OS:&lt;br /&gt;
&lt;br /&gt;
=Ubuntu Linux=&lt;br /&gt;
&#039;&#039;&#039;Ubuntu Linux:&#039;&#039;&#039;&lt;br /&gt;
#&amp;lt;code&amp;gt;$sudo apt-get install mysql-server&amp;lt;/code&amp;gt; &#039;&#039;(see also: https://help.ubuntu.com/10.04/serverguide/C/mysql.html )&#039;&#039;&lt;br /&gt;
#Create a password when asked&lt;br /&gt;
#To configure MySQL to listen for connections from network hosts, edit &#039;&#039;/etc/mysql/my.cnf&#039;&#039; and change the bind-address directive to the server&#039;s IP address:&lt;br /&gt;
##from: &amp;lt;code&amp;gt;bind-address = 127.0.0.1&amp;lt;/code&amp;gt; &lt;br /&gt;
##to: &amp;lt;code&amp;gt;bind-address = 192.168.0.5&amp;lt;/code&amp;gt;&lt;br /&gt;
#*Note: Replace 192.168.0.5 with the appropriate address.&lt;br /&gt;
#*Note: To allow local and remote access try comment out bind-address using a hash(#) or use &amp;lt;code&amp;gt;bind-address = 0.0.0.0&amp;lt;/code&amp;gt;&lt;br /&gt;
#Restart your MySQL server. &amp;lt;code&amp;gt;$sudo restart mysql&amp;lt;/code&amp;gt;&lt;br /&gt;
#Get into the MySQL command line utility: &amp;lt;code&amp;gt;$mysql -u root -p&amp;lt;/code&amp;gt;&lt;br /&gt;
#Enter the following commands:&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
#Close out the command line tool with &amp;lt;code&amp;gt;\q&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Arch Linux=&lt;br /&gt;
&#039;&#039;&#039;Arch Linux:&#039;&#039;&#039;&lt;br /&gt;
*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, XBMC will require no modifications to work with it.&lt;br /&gt;
#Install MariaDB: &amp;lt;code&amp;gt;$ sudo pacman -S mariadb&amp;lt;/code&amp;gt;&lt;br /&gt;
#Start the service: &amp;lt;code&amp;gt;$ sudo systemctl start mysqld&amp;lt;/code&amp;gt;&lt;br /&gt;
#To have it automatically launch at startup: &amp;lt;code&amp;gt;$ sudo systemctl enable mysqld&amp;lt;/code&amp;gt;&lt;br /&gt;
#Create a password: &amp;lt;code&amp;gt;$ /usr/bin/mysql_secure_installation&amp;lt;/code&amp;gt; &#039;&#039;This will also clean up the demo database.&#039;&#039;&lt;br /&gt;
#Get into the MariaDB command line utility: &amp;lt;code&amp;gt;$ mysql -u root -p&amp;lt;/code&amp;gt;&lt;br /&gt;
#Enter the following commands:&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
#Close out the command line tool with &amp;lt;code&amp;gt;\q&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=RedHat based Linux=&lt;br /&gt;
&#039;&#039;&#039;RedHat based Linux (RHEL, CentOS, Fedora):&#039;&#039;&#039;&lt;br /&gt;
#&amp;lt;code&amp;gt;$sudo yum install mysql-server&amp;lt;/code&amp;gt;&lt;br /&gt;
#Create a password when asked&lt;br /&gt;
#To configure MySQL to listen for connections only from network hosts, edit &#039;&#039;/etc/mysql/my.cnf&#039;&#039; and add the bind-address directive to the server&#039;s IP address:&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;bind-address = 192.168.0.5&amp;lt;/code&amp;gt;&lt;br /&gt;
#*Note: Replace 192.168.0.5 with the appropriate address.&lt;br /&gt;
#*Note: Alternatively you can leave this file as is to allow local and remote access.&lt;br /&gt;
#Restart your MySQL server. &amp;lt;code&amp;gt;$sudo /sbin/service mysqld restart&amp;lt;/code&amp;gt;&lt;br /&gt;
#*Recommended - Set your MySQL root password with &amp;lt;code&amp;gt;/usr/bin/mysqladmin -u root password &#039;new-password&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
#Get into the MySQL command line utility: &amp;lt;code&amp;gt;$mysql -u root -p&amp;lt;/code&amp;gt;&lt;br /&gt;
#*Enter your MySQL root password as set above, or just press enter if you didn&#039;t set one to log in with a blank password&lt;br /&gt;
#Enter the following commands:&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
#Close out the command line tool with &amp;lt;code&amp;gt;\q&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Mac OS X=&lt;br /&gt;
&#039;&#039;&#039;Mac OS X:&#039;&#039;&#039;&lt;br /&gt;
#Download a copy of MySQL server from http://dev.mysql.com/downloads/mysql/&lt;br /&gt;
#In Mac OS X, go to System Preferences -&amp;gt; MySQL, and click on “Start MySQL Server”.  You’ll also want to tick to enable the “Automatically … on Startup” option.&lt;br /&gt;
#Now to set up the &amp;quot;xbmc&amp;quot; user in MySQL and give it access. Launch Terminal.app on your Mac and issue the following commands, one line at a time:&lt;br /&gt;
##&amp;lt;code&amp;gt;sudo /usr/local/mysql/bin/mysql&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;&lt;br /&gt;
#Remain in Terminal.app. Now you&#039;ll be giving other computers on your network access to MySQL. Enter the next set of commands, one line at a time:&lt;br /&gt;
##&amp;lt;code&amp;gt;cd /usr/local/mysql/support-files/&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;sudo cp my-huge.cnf /etc/my.cnf&amp;lt;/code&amp;gt;&lt;br /&gt;
##:&#039;&#039;The command line will ask for your Mac OS X user password. Enter it and press return. No text will show when you type your password in, this is normal.&lt;br /&gt;
##&amp;lt;code&amp;gt;cd /etc&amp;lt;/code&amp;gt;&lt;br /&gt;
##&amp;lt;code&amp;gt;sudo nano my.cnf&amp;lt;/code&amp;gt;&lt;br /&gt;
##:&#039;&#039;This opens a file in a command line text editor&#039;&#039;&lt;br /&gt;
##Scroll down to the [mysqld] section and add or edit the following line so that it appears as:&lt;br /&gt;
##:&amp;lt;code&amp;gt;bind-address = ***.***.***.***&amp;lt;/code&amp;gt;&lt;br /&gt;
##Save and exit from the command line text editor&lt;br /&gt;
#Reboot the Mac, or restart the MySQL service from the System Preferences pane you installed earlier&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Alternative guide for Mac OS X: http://forum.xbmc.org/showthread.php?tid=151631&lt;br /&gt;
&lt;br /&gt;
=Windows=&lt;br /&gt;
&#039;&#039;&#039;Windows:&#039;&#039;&#039;&lt;br /&gt;
#Download a copy of MySQL server from http://dev.mysql.com/downloads/mysql/&lt;br /&gt;
#Select &#039;&#039;Standard configuration&#039;&#039;&lt;br /&gt;
#Create a password when asked&lt;br /&gt;
#Select that you want the database to have network access when prompted during installation.&lt;br /&gt;
#Open the &amp;quot;MySQL Command Line Client&amp;quot; from the MySQL start menu&lt;br /&gt;
#Enter the following commands:&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
##Type in: &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt; and press return&lt;br /&gt;
#Close out the command line tool&lt;br /&gt;
#If you&#039;re using a firewall such as the one that&#039;s built into Windows, you will need to do this next step.&lt;br /&gt;
:*&#039;&#039;&#039;Windows 7 Built-in Firewall&#039;&#039;&#039; &lt;br /&gt;
:#Go to control panel and open Windows Firewall&lt;br /&gt;
:#Click on Advanced Settings&lt;br /&gt;
:#Click on Inbound Rules, then New Rule&lt;br /&gt;
:#For the Rule Type, choose &#039;&#039;&#039;&#039;&#039;Port&#039;&#039;&#039;&#039;&#039; and hit Next&lt;br /&gt;
:#For Protocol and Ports, select TCP protocol and type in &#039;&#039;&#039;&#039;&#039;3306&#039;&#039;&#039;&#039;&#039; for the &#039;&#039;&#039;&#039;&#039;Specific local ports&#039;&#039;&#039;&#039;&#039; and hit Next&lt;br /&gt;
:#For Action, leave it at default which is &#039;&#039;&#039;&#039;&#039;Allow the connection&#039;&#039;&#039;&#039;&#039; and hit Next&lt;br /&gt;
:#For Profile, you can leave it as default (everything checked by default) and hit Next&lt;br /&gt;
:#For Name, set it to &#039;&#039;&#039;&#039;&#039;MySQL&#039;&#039;&#039;&#039;&#039; or any name that you will know what it is and click Finished&lt;br /&gt;
:*&#039;&#039;&#039;Windows XP Built-in Firewall&#039;&#039;&#039;&lt;br /&gt;
:#Open Control Panel and Set to &#039;Classic View&#039;&lt;br /&gt;
:#Double Click on Windows Firewall&lt;br /&gt;
:#Click on tab that says Exceptions&lt;br /&gt;
:#Click on Add Port&lt;br /&gt;
:#Name it &#039;&#039;&#039;&#039;&#039;MySQL&#039;&#039;&#039;&#039;&#039; or any other name&lt;br /&gt;
:#Set the port number to &#039;&#039;&#039;3306&#039;&#039;&#039;&lt;br /&gt;
:#Choose &#039;&#039;&#039;&#039;&#039;TCP&#039;&#039;&#039;&#039;&#039; and click OK&lt;br /&gt;
&lt;br /&gt;
{{Note|If XBMC is unable to connect to the MySQL server, returning an error code [1130]:}}&amp;lt;br/&amp;gt;&lt;br /&gt;
If this occurs to you, try amending Step 2 above to read &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;@&#039;xxx.xxx.xxx.%&#039;;&amp;lt;/code&amp;gt; where xxx.xxx.xxx is the first three quadrants of your home network&#039;s IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect.&lt;br /&gt;
&lt;br /&gt;
=Other NAS=&lt;br /&gt;
MySQL can also be installed on some [[w:network-attached storage|network-attached storage (NAS)]] device devices. Here are some guides for various NAS devices that can have a MySQL server installed:&lt;br /&gt;
&lt;br /&gt;
*Devices running Arch Linux ARM (such as the PogoPlug, Dockstar, etc) can use the [[HOW-TO:Share libraries using MySQL/Setting up MySQL/ALARM|Arch Linux instructions]] on this page.&lt;br /&gt;
*[http://quixventure.com/2011/12/configure-a-synology-nas-as-mysql-server-for-xbmc/ Synology NAS as MySQL server for XBMC]&lt;br /&gt;
*http://www.robvanhamersveld.nl/2013/02/05/share-your-xbmc-12-0-library-on-a-synology-ds-or-other-nas/ Synology DS with MySQL guide based on Frodo&lt;br /&gt;
*http://forum.xbmc.org/showthread.php?tid=172548 - unRAID&lt;br /&gt;
&lt;br /&gt;
=FreeNAS and freeBSD=&lt;br /&gt;
&lt;br /&gt;
== About FreeNAS ==&lt;br /&gt;
&lt;br /&gt;
http://www.freenas.org/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeNAS is a FreeBSD based NAS system that can be run on almost any hardware - it uses ZFS for disk and file management. It is used at home and in enterprise businesses. 99% of tasks can be done via the web interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example below is based on FreeNAS 9.1.1 on 12/12/13, and assumes you have already configured your nas with drives, datasets etc&lt;br /&gt;
&lt;br /&gt;
== How to ==&lt;br /&gt;
&lt;br /&gt;
=== Make a jail ===&lt;br /&gt;
&lt;br /&gt;
create a Jail via the FreeNAS webui - if unsure see here http://doc.freenas.org/index.php/Adding_Jails&lt;br /&gt;
&lt;br /&gt;
make a note of the jail IP address shown - you will need this to put in the advancedsettings.xml file on the XBMC machine later&lt;br /&gt;
&lt;br /&gt;
=== Prepare the jail ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*ssh into FreeNAS&lt;br /&gt;
**If you have a windows PC use putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) &lt;br /&gt;
**(easiest) click the &amp;quot;shell&amp;quot; button in the left of the FreeNAS webui&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
type the following commands&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;jls&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Take note of the JID of the jail you created, use it in the command below and replace n with the number of the jail you just created&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;jexec n csh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install mysql ===&lt;br /&gt;
You are now inside your jail&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;pkg install mysql55-server&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;pkg install nano&amp;lt;/code&amp;gt;&lt;br /&gt;
**(nano is a text editor you will need shortly)&lt;br /&gt;
&lt;br /&gt;
We now need to enable mysql in rc.conf&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;nano /etc/rc.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
insert the line below into the rc.conf file&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;mysql_enable=&amp;quot;YES&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
save the file and exit (see bottom of nano edit page for keystrokes info)&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;service mysql-server start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optional step below - this is an automated script that will secure you mysql instance - it will prompt you for answers to questions. Its up to you if you do this.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;mysql_secure_installation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure mysql ready for xbmc to use ===&lt;br /&gt;
&lt;br /&gt;
type in&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;mysql -u root -p&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are now in mysql administration&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;CREATE USER &#039;xbmc&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;GRANT ALL ON *.* TO &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;quit;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
that&#039;s it - proceed to the next step below and configure XBMC to use your FreeNAS hosted XBMC MYSQL database - I love mine!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;headertabs /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If your library loads slowly with MySQL then you may wish to check out &#039;&#039;&#039;[[HOW-TO:Sync multiple libraries/Advanced notes#MySQL speed-up tweaks|these MySQL speed-up tweaks]]&#039;&#039;&#039;.&lt;br /&gt;
{{Divbox|green||&#039;&#039;&#039;Optional:&#039;&#039;&#039; For a more secure MySQL installation use these 2 commands to grant permission only to databases XBMC uses. This is useful if you plan on using your MySQL server for more than just XBMC, or if you&#039;re worried about your internal network being exposed and wanting to lock things down more, etc. If you only use the MySQL server for XBMC and that server has non-critical data on it, then this probably not necessary.&lt;br /&gt;
#&amp;lt;code&amp;gt;GRANT ALL ON `MyMusic%`.* TO &#039;xbmc&#039;@&#039;%&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
#&amp;lt;code&amp;gt;GRANT ALL ON `MyVideos%`.* TO &#039;xbmc&#039;@&#039;%&#039; IDENTIFIED BY &#039;xbmc&#039;;&amp;lt;/code&amp;gt;&lt;br /&gt;
Note: these grants do not appear to give the xbmc user permissions to create required TRIGGERs.  So either figure out how to do an additional limited grant to create TRIGGERs or use the broader grant *.* statement above. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Next|[[HOW-TO:Share libraries using MySQL/Setting up XBMC|Setting up XBMC]]}}&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallname.JPG&amp;diff=67452</id>
		<title>File:Win7firewallname.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallname.JPG&amp;diff=67452"/>
		<updated>2014-01-05T09:43:37Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows 7 Firewall, final step&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows 7 Firewall, final step&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallapplyto.JPG&amp;diff=67451</id>
		<title>File:Win7firewallapplyto.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallapplyto.JPG&amp;diff=67451"/>
		<updated>2014-01-05T09:42:31Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows 7 Firewall, applying to section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows 7 Firewall, applying to section&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallallow.JPG&amp;diff=67450</id>
		<title>File:Win7firewallallow.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallallow.JPG&amp;diff=67450"/>
		<updated>2014-01-05T09:41:26Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows 7 Firewall choosing the allow action&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows 7 Firewall choosing the allow action&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallrules_port2.JPG&amp;diff=67449</id>
		<title>File:Win7firewallrules port2.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallrules_port2.JPG&amp;diff=67449"/>
		<updated>2014-01-05T09:40:03Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Second part of the ports for Windows 7 Firewall&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Second part of the ports for Windows 7 Firewall&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallrules_port.JPG&amp;diff=67448</id>
		<title>File:Win7firewallrules port.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallrules_port.JPG&amp;diff=67448"/>
		<updated>2014-01-05T09:38:57Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows 7 Firewall, selecting Port&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows 7 Firewall, selecting Port&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewallrules.JPG&amp;diff=67447</id>
		<title>File:Win7firewallrules.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewallrules.JPG&amp;diff=67447"/>
		<updated>2014-01-05T09:36:26Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows 7 Firewall Inbound Rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows 7 Firewall Inbound Rules&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=File:Win7firewall.JPG&amp;diff=67446</id>
		<title>File:Win7firewall.JPG</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=File:Win7firewall.JPG&amp;diff=67446"/>
		<updated>2014-01-05T09:35:18Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: Windows Firewall for Windows 7 (same thing for Windows Server 2008)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Windows Firewall for Windows 7 (same thing for Windows Server 2008)&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=User:Scsa20&amp;diff=67445</id>
		<title>User:Scsa20</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=User:Scsa20&amp;diff=67445"/>
		<updated>2014-01-05T09:07:44Z</updated>

		<summary type="html">&lt;p&gt;Scsa20: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello everyone, name&#039;s Michael, been using XBMC for a good 2 years or so on my PC and running OpenELEC on 3 different devices. I hope I can help contribute with providing helpful information about this wonderful media center.&lt;/div&gt;</summary>
		<author><name>Scsa20</name></author>
	</entry>
</feed>