• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 41
HOW-TO:Share libraries using MySQL: Wiki Edition
#16
(2013-03-21, 02:50)Ned Scott Wrote:
(2013-03-20, 21:24)SchattenMann Wrote: i was wondering: why does the wiki guide doesn't say the user can simply export the SQLite database and import it on MySQL...

I mean it took me 15 min to do it after i got tired of fussing around with Import/Export database...

Didn't know it was an option. Can you tell me more about the steps involved?

Yes, please share because after several attempts, I just can't seem to get this to work right and it looks like I can't get any help. LOL
Reply
#17
(2013-03-19, 23:39)Tyler Durden Wrote: What am I doing wrong !?

Code:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| master usermusic32 |
| master uservideo75 |
| mysql              |
| performance_schema |
| test               |
+--------------------+
6 rows in set (0.08 sec)

mysql> select count(*) from master uservideo75.movie;
ERROR 1046 (3D000): No database selected
mysql> select count(*) from master uservideo75.tvshow;
ERROR 1046 (3D000): No database selected
mysql> select count(*) from master usermusic32;
ERROR 1046 (3D000): No database selected
mysql>

The databases appear to have been made, but I cannot get a count from them.

Help!



you need to select the database with this command
use databasename; -> use master uservideo75;
Reply
#18
(2013-03-21, 03:35)EddieB606 Wrote:
(2013-03-21, 02:50)Ned Scott Wrote:
(2013-03-20, 21:24)SchattenMann Wrote: i was wondering: why does the wiki guide doesn't say the user can simply export the SQLite database and import it on MySQL...

I mean it took me 15 min to do it after i got tired of fussing around with Import/Export database...

Didn't know it was an option. Can you tell me more about the steps involved?

Yes, please share because after several attempts, I just can't seem to get this to work right and it looks like I can't get any help. LOL

Sure,

Open your SQLite database with SQLite Manager Extension for firefox
Go to Tools - Options - Main - Characters to enclose the identifiers with = Grave Accents ``
Go to Database - Export Database

If you are starting a clean database you can just import the SQL file. My XBMC installation had already created a clean MyVios75 and MyMusic32 so i used that database instead of creating a new one therefor i will comment all "Create" stuff.

Open the file with Notepad++
Find and Replace "Drop Table" with "Truncate Table" -> this will make sure the tables are clean, don't do it if it's already a clean table
Find and Replace "Create Table" with "-- Create Table" -> my tables are already created, don't do it if it is a clean database
Find and Replace "Create View" with "-- Create View" -> my tables are already created, don't do it if it is a clean database
Find and Replace "Create Trigger" with "-- Create Trigger" -> my tables are already created, don't do it if it is a clean database
Find and Replace "Create Index" with "-- Create Index" -> my tables are already created, don't do it if it is a clean database
Find and Replace "Create Unique Index" with "-- Create Unique Index" -> my tables are already created, don't do it if it is a clean database

99% of the work is done. You probably should take a look and search for names with a ': Mike O'Dole for example. Your script will have this cases like Mike O''Dole and this will generate errors. You have two options:

either

Start Running your script and, when you have an error, solve it and run it again;

or

Find and Replace '' with \'
Find and Replace ,\', with ,'',

By now you should have nothing else to do but import the script. You can run it as many times as you want until it goes through. Don't worry to much with errors, just read them and correct it...if there are any it will be simple differences between SQLite and MySQL syntax.

Have fun your XBMC installation that is EXACTLY equal as it was before
Reply
#19
Will mysql work with xbmc launcher?

Thanks
ImageImage
intel G530/BIostar th67+/Cx430/2x4gb ripjaws x 1600/N mediapc 1000B case/N media lcd/Asus gt520/60gb adata ssd.os/2tb spinpoint 5400 rpm. Media/Hp dvd rw
Reply
#20
no idea...can't see why not
Reply
#21
You can also use MariaDB 5.5 instead of MySQL 5.5. It's reported to be faster, too. I've been thinking of moving the database from my server to my router, though... 128mb of RAM, have it store the database in an external drive alongside the movies and have that act as both the SMB or NFS server as well as the MySQL server... but I don't know if I want to potentially slow down the router. lol

(2013-03-21, 15:39)jonatan Wrote: Will mysql work with xbmc launcher?

Thanks

Yes, I use it on two media centers that currently run windows and it works fine.

(2013-02-28, 03:26)SandmanCL Wrote: This guide does not cover the synchronization of thumbnails. Currently I am using rsync to make sure the Thumbnails directory is in sync between my XBMC master and my ATV2 clients. This worked perfectly on Eden, but with Frodo I need to additionally sync Textures13.db, but even after doing this I need to restart XBMC on the ATV clients in order for the Thumbnails to show up.

I feel this is a step in the wrong direction and I'm hoping I'm missing some crucial point that would make it easier.

Frodo automatically syncs thumbnails. Just export your library to seperate files, set the MySQL database, import the library, done. Each client will automatically create a local cache of the thumbnails.
Reply
#22
Im interested in this
Quote:You can also use MariaDB 5.5 instead of MySQL 5.5.
How would i go about this since iv already set my sql up
mysql takes for ever to load posters thumbs

Thanks
ImageImage
intel G530/BIostar th67+/Cx430/2x4gb ripjaws x 1600/N mediapc 1000B case/N media lcd/Asus gt520/60gb adata ssd.os/2tb spinpoint 5400 rpm. Media/Hp dvd rw
Reply
#23
(2013-03-23, 17:20)jonatan Wrote: Im interested in this
Quote:You can also use MariaDB 5.5 instead of MySQL 5.5.
How would i go about this since iv already set my sql up
mysql takes for ever to load posters thumbs

Thanks

It depends on what OS you are using for the server. Here is Ubuntu 12.04's guide. It's a drop in replacement so no need to export and import the database. (although backing up is always recommended.) I'll try to write up better instructions tomorrow when I'm not typing this on a phone. lol
As far the slow loading of thumbnails, I suggest you limit the resolution on the computer having the problem. That can make a huge difference.
Reply
#24
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW..._libraries

Would you be interested in an addition to the Wiki on how to set this up in Arch with MySQL and/or MariaDB? I'm thinking of moving my server from Ubuntu to Arch as it's the only machine in the house that still runs Ubuntu and I figured I could always make a walkthrough as I do it.
Reply
#25
Have this set up as per Howtogeek and it works ok, however it states you can have this work with a MySQL server that is always on or nearly always on. Being a green kiind of person I have set my server (also the TV server) to sleep after x minutes and my clients to send a WOL magic packet to wake the server, epg gets updated and I am up and running in about 10 seconds. If the server is on when XBMC is launched (at start up), then the database is updated, however if the server is asleep, XBMC hangs - I figure because xbmc is trying to query the database before a WOL is sent (using Advanced Wake On LAN) but the server is asleep.

Is there any way to delay the query until after the WOL magic packet is sent and the server is up.
Reply
#26
(2013-03-28, 01:49)ivanmmj Wrote:
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW..._libraries

Would you be interested in an addition to the Wiki on how to set this up in Arch with MySQL and/or MariaDB? I'm thinking of moving my server from Ubuntu to Arch as it's the only machine in the house that still runs Ubuntu and I figured I could always make a walkthrough as I do it.

That would be awesome.
Reply
#27
(2013-03-28, 10:53)Ned Scott Wrote:
(2013-03-28, 01:49)ivanmmj Wrote:
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW..._libraries

Would you be interested in an addition to the Wiki on how to set this up in Arch with MySQL and/or MariaDB? I'm thinking of moving my server from Ubuntu to Arch as it's the only machine in the house that still runs Ubuntu and I figured I could always make a walkthrough as I do it.

That would be awesome.

Alright. As soon as I get some free time to backup//reformat my server so I can migrate it, I will write up the how to. Seeing as Arch just recently switched from MySQL to MariaDB as the default SQL database, I will be making it just for MariaDB. There will be NO extra steps required to make it work instead of MySQL.
Reply
#28
Hey, if MariaDB works better, by all means, go for it.
Reply
#29
(2013-03-28, 01:49)ivanmmj Wrote:
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW..._libraries

Would you be interested in an addition to the Wiki on how to set this up in Arch with MySQL and/or MariaDB? I'm thinking of moving my server from Ubuntu to Arch as it's the only machine in the house that still runs Ubuntu and I figured I could always make a walkthrough as I do it.

I converted over not too long ago from mysql to mariadb for ALARM. Are you planning on updating: http://wiki.xbmc.org/index.php?title=HOW...ySQL/ALARM? I was planning on submitting some changes to Ned on this.

When you setup mariadb I suggest that you try out the myisam storage engine which I found was a lot faster then the default innodb storage engine for the purposes of XBMC.
Kodi 17, Transparency Skin
PogoPlug v4 running Arm Linux 4.4.63 as MySQL (mariadb) server.
Mac OS 10.12.5
2015 27" iMac 3.3 GHz Quad, 16GB RAM, 1TB SSD
2015 13" Macbook Pro, 8GB RAM, 256GB SSD
AppleTV 4 TV OS 10
Reply
#30
(2013-04-02, 01:34)winestock Wrote:
(2013-03-28, 01:49)ivanmmj Wrote:
(2013-02-25, 22:27)Ned Scott Wrote: http://wiki.xbmc.org/index.php?title=HOW..._libraries

Would you be interested in an addition to the Wiki on how to set this up in Arch with MySQL and/or MariaDB? I'm thinking of moving my server from Ubuntu to Arch as it's the only machine in the house that still runs Ubuntu and I figured I could always make a walkthrough as I do it.

I converted over not too long ago from mysql to mariadb for ALARM. Are you planning on updating: http://wiki.xbmc.org/index.php?title=HOW...ySQL/ALARM? I was planning on submitting some changes to Ned on this.

When you setup mariadb I suggest that you try out the myisam storage engine which I found was a lot faster then the default innodb storage engine for the purposes of XBMC.

The only thing I'd be afraid of with using myisam would be loss of data integrity. But then again, my server has a battery backup... Maybe I'll check it out. Have you tried any of the other storage engines?
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 41

Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition2
This forum uses Lukasz Tkacz MyBB addons.