Kodi Community Forum

Full Version: with Mysql on NAS scrape and other function does not work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In short, I followed this blog . It helps create a mysql db to host any data for all xbmc instance on my network.

So I did put the mysql on a NAS as well as my Movies and TV Shows. Also I know the XBMC do connect to the mysql because a bunch of tables were created after I started one of the xbmc. That went well up to this point.

1- I can't scape any movie or tv shows
2- the flag for set as viewed doesn't work
3- the auto bookmark for file startup doesn't work

In the log there is always a "cannot connect to mysql" kind of message but I don't understand why it was able to create tables and not fill them.

Any thoughs, suggestions?
same here. can't get a think working. new too this too
try and provide a bit more information if you want help.

Consider:
What does your advancedsettings.xml have in it
What does the debug log say when you try and connect to the mySQL DB
Are your shares accessible to the client PC
Have you set up the sources correctly using smb or other networking protocol
What is the directory structure of your media
What scraper are you using
Does the scraper work on a standard XBMC install
What appears in your library once you have set it up
What is your server and client OS
what is your version of XBMC?
How have you tested it out so far

Use the wiki or forums to help find out how to do any of these if you don't know how.

Just saying it doesn't work doesn't really help solve the problem.
Ok I finally found some time to do this post so here are the things asked. Any help is really appreciated.

So lets try something simple, lets say I connect a windows (XP) version on my Netgear readyNAS NV+ which is where I store my medias and the mysql.

rocketpants Wrote:What does your advancedsettings.xml have in it

[HTML]<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.111.105</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.111.105</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>[/HTML]

rocketpants Wrote:What does the debug log say when you try and connect to the mySQL DB

Here is the log I get when I start xbmc. you can see at line 107 the errors about mysql starting
http://pastebin.com/RPBX9yWv

and here a log when I watch a file:
http://pastebin.com/TL2KNAHW

rocketpants Wrote:Are your shares accessible to the client PC

Yes, I can view the files with my local vlc player through the smb share

rocketpants Wrote:Have you set up the sources correctly using smb or other networking protocol

Yes smb, like I said I can read all the files on any xbmc. The problem is what you can read on my first post.

rocketpants Wrote:What is the directory structure of your media

Example my tv shows are:
TV Shows/[tv show name]/season 1/[name]s01exx.[blahblah].avi

rocketpants Wrote:What scraper are you using

tvdb

rocketpants Wrote:Does the scraper work on a standard XBMC install

rocketpants Wrote:What appears in your library once you have set it up

Nothing, I've got absolutely nothing! I had stuff in my library with the same files when not connected to mysql

rocketpants Wrote:What is your server and client OS

server: readyNAS NV+ clients: see my signature!

rocketpants Wrote:what is your version of XBMC?

please read my signature

rocketpants Wrote:How have you tested it out so far

I read forums for about 2 days trying to find my problem. Everyone seems to find a solution after a while but not me Sad. I drop all shemas on the mysql and restarted xbmc the shema and tables are created so THERE IS a connection, read for your self:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| firefly |
| frontview |
| mysql |
| mythconverg |
| slimserver |
| xbmc_music |
| xbmc_video |
+--------------------+
8 rows in set (0.03 sec)

mysql> use xbmc_video
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------------+
| Tables_in_xbmc_video |
+----------------------+
| actorlinkmovie |
| actors |
| bookmark |
| country |
| countrylinkmovie |
| directorlinkmovie |
| genre |
| genrelinkmovie |
| movie |
| path |
| settings |
| stacktimes |
| sys_seq |
| version |
| writerlinkmovie |
+----------------------+
15 rows in set (0.01 sec)

mysql>

NOW why xbmc doesn't create all the tables it need?? This part I don't get...
I had this exact problem and the issue ended up being my bind address.

look in your mysql config file (my.cnf)...About half way down check your bind-address and make sure its not set to 127.0.0.1. If it is, set it to the IP of your server and see if that helps.

I know it doesnt make sense because if its set to 127.0.0.1 the xbmc client shouldnt be able to even create the tables but on mine it was creating the tables but couldnt write any data to them.
wintland Wrote:I had this exact problem and the issue ended up being my bind address.

look in your mysql config file (my.cnf)...About half way down check your bind-address and make sure its not set to 127.0.0.1. If it is, set it to the IP of your server and see if that helps.

I know it doesnt make sense because if its set to 127.0.0.1 the xbmc client shouldnt be able to even create the tables but on mine it was creating the tables but couldnt write any data to them.

Nice suggestion.

My bind-address was commented out. I uncommented it and set it to the server ip, stop and started the mysql. It doesn't solve the problem as xbmc log show exactly the same thing

here is my my.cnf, maybe there is an other conf that is missing:
http://pastebin.com/0ieEVMVm
Certainly not getting the db tables set up right. Here are my tables for xbmc_video

Code:
mysql> show tables;
+------------------------+
| Tables_in_xbmc_video   |
+------------------------+
| actorlinkepisode       |
| actorlinkmovie         |
| actorlinktvshow        |
| actors                 |
| artistlinkmusicvideo   |
| bookmark               |
| country                |
| countrylinkmovie       |
| directorlinkepisode    |
| directorlinkmovie      |
| directorlinkmusicvideo |
| directorlinktvshow     |
| episode                |
| episodeview            |
| files                  |
| genre                  |
| genrelinkmovie         |
| genrelinkmusicvideo    |
| genrelinktvshow        |
| movie                  |
| movielinktvshow        |
| movieview              |
| musicvideo             |
| musicvideoview         |
| path                   |
| setlinkmovie           |
| sets                   |
| settings               |
| stacktimes             |
| streamdetails          |
| studio                 |
| studiolinkmovie        |
| studiolinkmusicvideo   |
| studiolinktvshow       |
| tvshow                 |
| tvshowlinkepisode      |
| tvshowlinkpath         |
| version                |
| writerlinkepisode      |
| writerlinkmovie        |
+------------------------+
40 rows in set (0.00 sec)

A few other thoughts
What version of mysql are you using? I seem to recall someone having issues with a v4.? and it was fixed by upgrading. I'm using 5.1

I had to do something with the default character set - making it latin1 see this link. I didn't see any references to latin in your .cnf file

That whole thread is quite good but there is lots of it
My mysql version is 5.0:

Code:
copernic:/usr/share/mysql/charsets# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.24a-Debian_3.infrant1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I tried to force the charset to Latin1. I don't know if I did it correctly, but the results is the same in xbmc: a few tables are created but not the full list like the one you show me.

I added those lines to my.cnf:

Code:
character-sets-dir = /usr/share/mysql/charsets
default-character-set = latin1

Doesn't seems to do the job.

Also I read the thread you give me up to page 8 or 9 but its very general talk, so I figure I could open a new thread with my specific problem. It seems I am not the only one with this issue.

Any help is really appreciated! Does anyone has a new avenue I can explore for this problem?
Maybe I can create the missing tables by hand. Can someone paste the create statements for the video database? It would be really kind.
I would try downloading Workbench for MySQL which is a graphical user interface. Run it on your windows machine and connect to your MySQL database remotely. Make sure you use the user/pass you have setup in your xbmc advancedsettings.xml file.

Just knowing whether you can connect and authenticate and manipulate things will help us troubleshoot. If you cant connect with the GUI using the XBMC user/pass then try connecting with the root user/pass. This may help us narrow down where the issue is. (this is how I actually realized what my problem was as I couldn't connect remotely with any user credentials)

You can get workbench here
http://dev.mysql.com/downloads/workbench/5.2.html
I already have workbench. But your post help me realize even though I thought I was in latin1 I was still in utf-8!

I fixed my my.cnf and now it's rolling!
Big Grin

I am at this moment, trying a scan and it seems to work because it's been runing now for a few seconds.

Now I will have to re-read the thread by focusing on sharing the thumbnails, another epic challenge awaits me Nerd
Glad to see you've got it working.

sharing of thumbs is a pain, and looking at your clients its not going to be too easy. at least with linux/Win7/OSX you can create symlinks but you'll need to find a program to do that for you in XP and I have no idea how it works for ATV2.

I've ended up just synching the thumbnails folder between the clients rather than try and symlink it. It is faster to access fanart that way and seeing as I only update the library from one client its easy enough to sync thumbnails to all other clients (2 way sync using freefilesync for windows - a very quick little sync program).