Talk:MySQL: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ivanmmj
No edit summary
Line 79: Line 79:


: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)
: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)
== MariaDB ==
MariaDB works as a drop in replacement to MySQL and it'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)

Revision as of 17:46, 24 January 2013

NAS how-to link dump

Dumping some urls that might be usable or be a base for how-to's on mysql on NAS's. -- Ned Scott 04:37, 15 November 2011 (EST)

Other useful links

Some more links to look into. -- Ned Scott 20:55, 15 November 2011 (EST)

A couple of comments

Ubuntu users can install MySQL from official Ubuntu repos using apt-get: https://help.ubuntu.com/10.04/serverguide/C/mysql.html

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)?

Lastly, the scottbrant.net/?p=495 link in the article is not working for me.

Update: I also got access denied errors in the MySQL log while trying to import my XBMC database into it. I think there's a missing step in the article for setting the MySQL 'xbmc' user password. The MythTV wiki has some troubleshooting info on setting passwords that helped: http://www.mythtv.org/wiki/Category:MySQL

--HunterZ 14:42, 11 December 2011 (EST)

Added your links. Eventually we'll have a more general MySQL page for troubleshooting and more advanced setups, but I still put in the mythtv link in the "see also" section for the time being. "CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';" should create the password. The password is what IDENTIFIED BY sets.
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 "xbmc_video" and "xbmc_music" databases (Eden will create databases if missing).
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.
Thanks for the links and let us know if you have any other feedback/ideas/whatever! -- Ned Scott 22:52, 11 December 2011 (EST)


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.

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.
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 "old" way first and if it fails (check your log) then simply drop those two databases (unless upgrading and you don't have a backup already!)
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't want to step on any toes right off the bat! J114 02:32, 15 December 2011 (EST)
will put a warning note in there, but hopefully that's a bug that will be fixed by Eden's release. -- Ned Scott 02:37, 15 December 2011 (EST)


On my win 7 PC, sharing thumbnails caused hangs/freezes, removing the path substitution from advancedsettings.xml fixed the problem.


I'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)

       <!-- profiles for iPad: everything except guisettings  -->
       <substitute>
          <from>special://masterprofile/profiles/Olivier/guisettings.xml</from>
          <to>nfs://SHARE/userdata/profiles/Olivier/guisettings_iPad.xml</to>
        </substitute>    
       <substitute>
          <from>special://masterprofile/profiles/Olivier</from>
          <to>nfs://SHARE/userdata/profiles/Olivier</to>
        </substitute>    

Frofpa 04:08, 9 April 2012 (EDT)

That is a very bad idea, as it will share things that should not be shared, such as the database files. -- Ned Scott 04:50, 9 April 2012 (EDT)

Restricted privileges

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.

Using this instead of the "*.*" line makes XBMC only access/create its own databases: GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'192.168.1.%';

(Source: http://forum.xbmc.org/showthread.php?tid=114017 ) Michelv 14:20, 23 June 2012 (EDT) Michelv

Path substitution causes duplicate entries

The path substitution step listed in the article is problematic. I'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's resulting in duplicate entries on the next library update: http://forum.xbmc.org/showthread.php?tid=140536 --HunterZ 21:44, 14 September 2012 (EDT)

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. -- Ned Scott 02:58, 15 September 2012 (EDT)

MariaDB

MariaDB works as a drop in replacement to MySQL and it'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. Ivanmmj 12:46, 24 January 2013 (EST)