Kodi Community Forum
2 XBMC PCs and 1 Database on the shared NAS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603)



- charrua - 2010-08-27

mwkurt Wrote:Charrua,
Here is an update to my problem.
I went through my computer and found all instances of mysql, and deleted them. This allowed me to go back and reinstall mysql and enter new passwords. In my case I made the passwrord "xbmc", without the quotes.
I started XBMC and expected something to happen in the way of making a datbase and nothing happened. Here is my log file:

http://pastebin.com/RzDKYg3W

XBMC still can't open the database and it says (1045) but HeidlSQL works now and I can open my db structure when I enter the password "xbmc".

How do I get XBMC to integrate with mysql now?

Thanks,
Mark

Did you create the user 'xbmc' ?
If not you need to do it and give that user all permissions.
You can do that with HeidiSQL, from the menu choose tools>user manager and from there you can create the new user and assign all the permissions.


- mwkurt - 2010-08-28

Charrua,

I wanted to thank you for all of your help so far...so thanks!

Anyway, I finally figured what I was doing, sort of.

I created the db using HeidiSQL and the user "xbmc" with password "xbmc"

I closed HeidiSQL, opened XBMC, waited a minute then closed XBMC.
Reopened HeidiSQL and this is the result:

There are two items under xbmc_video > bookmark & version.

I don't really know what to look for to see if it is working as it should nor do I know how to test XBMC to see if it is working.

I highly doubt that it is set up correctly as my latest XBMC log is filled with errors:

http://pastebin.com/NeLSvKCr

I did not import my video db into XBMC the first time I reopened after I created the DB. I did however reopen after looking at HeidiSQl and imported at that time.

Do you have any more advice for me, please?

Also...I mentioned this before but never received an answer. When I added the mysqldb information to my advancedsettings.xml, the MOVIE and TVSHOWS entries on the HOME SCREEN are no longer there and I can no longer get into LIBRARY mode. Is this normal behaviour under these circumstances? If it is, All of this may be moot because I don't want to be without those entries and library mode.

Thanks,
Mark


- charrua - 2010-08-28

mwkurt Wrote:charrua,
Another update...I am getting closer.
When looking in HeidiSQL, Tools, User Manager, besides the root@localhost user, there is now an xbmc@localhost user as well.
The xbmc@localhost user has:
username - xbmc
Password - xbmc (however it changes to a rather long string when reopened)
From Host - Localhost (there was an % in this box but I changed it to localhost)

Open HeidiSQL again and revert the From Host to % as it was (that tells MySQL to allow user xbmc to log from every host).

mwkurt Wrote:Underneath that is a box that says "add privileges". There are two check boxes underneath....Sever Privileges & All Databases. They both have all items inside checked.
Is that all right?

Yes, that's ok.

mwkurt Wrote:Looking back through this thread, I saw where someone else had a similar problem and I think it was the character set. I chose Latin when I installed mysql:
Great. Cause if the collation is set to utf8 some indexes and tables won't be created.

mwkurt Wrote:Also I noticed an entry about a bug in mysql:
Reading your log, I think we've just found a bug in the MySQL functionality:
I don't have any local media sources in XBMC database, so I've never hit this error before, but it seems that the SQL for storing/querying local paths has a bug: it's trying to store the paths with "\" instead of "/" and for MySQL "\" is an special character, so it's returning a syntax error when trying to store a local path with that character. Note that network paths don't have that problem, because they are stored in the format "smb://NETWORK_ADDRESS/SHARED_PATH/".

Could this be affecting me? I am doing everything on the same computer.

Also true, if you define the media sources as local paths you will have a problem, cause they won't be scanned. To avoid this you can share the folders where the media is and then define the media sources over the shared paths.

mwkurt Wrote:I am still getting the following error when opening XBMC:
20:26:54 T:3756 M:234545152 ERROR: Unable to open database: xbmc_video (0)
20:26:54 T:3756 M:234545152 ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
20:26:54 T:3756 M:234541056 ERROR: Unable to open database: xbmc_video (0)
20:26:54 T:3756 M:234541056 ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
20:26:54 T:3756 M:234221568 ERROR: Unable to open database: xbmc_video (0)
20:26:54 T:3756 M:234221568 ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
20:26:54 T:3756 M:234221568 ERROR: Unable to open database: xbmc_video (0)
20:26:54 T:3756 M:234221568 ERROR: Unable to open database at host: localhost db: xbmc_video (old version?)
Any more ideas?
Thanks,
Mark
Try connecting to the db with HeidiSQL using user: xbmc and the password you've defined for it (it should be the same that the one you have in the <password> tag inside advancedsettings.xml) if you can connect to the dbs from HeidiSQL you should be able to connect from XBMC.


- charrua - 2010-08-28

mwkurt Wrote:Charrua,
I wanted to thank you for all of your help so far...so thanks!
Anyway, I finally figured what I was doing, sort of.

You're welcome. It's a good thing that you've started to read the whole thread, there's a lot of info already here.

mwkurt Wrote:I created the db using HeidiSQL and the user "xbmc" with password "xbmc"
I closed HeidiSQL, opened XBMC, waited a minute then closed XBMC.
Reopened HeidiSQL and this is the result:

There are two items under xbmc_video > bookmark & version.

I don't really know what to look for to see if it is working as it should nor do I know how to test XBMC to see if it is working.

I highly doubt that it is set up correctly as my latest XBMC log is filled with errors:

http://pastebin.com/NeLSvKCr

I did not import my video db into XBMC the first time I reopened after I created the DB. I did however reopen after looking at HeidiSQl and imported at that time.

Do you have any more advice for me, please?

Yes, make shure the dbs collation is really defined as latin1. In HeidiSQL right click the db and select Edit, the character set should be latin1, and collation could be latin1_general_ci, if not select them and click OK. After that delete all tables and views already created and start XBMC again, this time it should create all tables and views. As you did before, you can check that with HeidiSQL, there is no need to close XBMC while you connect to MySQL from HeidiSQL.

mwkurt Wrote:Also...I mentioned this before but never received an answer. When I added the mysqldb information to my advancedsettings.xml, the MOVIE and TVSHOWS entries on the HOME SCREEN are no longer there and I can no longer get into LIBRARY mode. Is this normal behaviour under these circumstances? If it is, All of this may be moot because I don't want to be without those entries and library mode.
Thanks,
Mark

As I wrote in my previous post, remember to share the paths where the media is and then define the media sources within XBMC using the networked paths instead of the local paths.


- mwkurt - 2010-08-29

Charrua,

Well.....I think it is working as it should!!!! Big Grin

I unistalled XBMC and put the latest nightlie in. I let it import everything overnight and low and behold, I still have my MOVIES and TVSHOWS entries on the home screen. I looked through my XBMC log and did not see any errors. So it looks good. Is there a way I can check to see if it is indeed working as it should.

I think I had to change two things in my mysql DB. First, the language was set latin1_swedish_ci, I changed it as you said to latin1_general_ci. And I changed all of my video libraries to Windows smb shares.

So everything looks good. Thanks so much for all of your help!

Mark


- charrua - 2010-08-29

mwkurt Wrote:Charrua,
Well.....I think it is working as it should!!!! Big Grin
I unistalled XBMC and put the latest nightlie in. I let it import everything overnight and low and behold, I still have my MOVIES and TVSHOWS entries on the home screen. I looked through my XBMC log and did not see any errors. So it looks good. Is there a way I can check to see if it is indeed working as it should.
I think I had to change two things in my mysql DB. First, the language was set latin1_swedish_ci, I changed it as you said to latin1_general_ci. And I changed all of my video libraries to Windows smb shares.
So everything looks good. Thanks so much for all of your help!
Mark
Well done!
Have you also tested the music library?


- mwkurt - 2010-08-30

Haven't yet done the music library, although I need to.

I will give it a go and let you know how everything went.

Thanks,
Mark


- mwkurt - 2010-08-30

Charrua,

I thought that I was done with you, but it seems that I need some help again.

I am now trying to connect one of my networked computers to the mysql database and am sort of at a loss as to hoe to do this.

What I have done so far...

1. Copied my advancedsettings.xml to the other computer's userdata folder.

2. Changed the host to the ip address of my server computer as follows:

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.6</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.6</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
<videolibrary>
<recentlyaddeditems>100</recentlyaddeditems>
<hideallitems>true</hideallitems>
<cleanonupdate>true</cleanonupdate>
<hideemptyseries>true</hideemptyseries>
</videolibrary>
</advancedsettings>

As you probably know, that did not get me my databases. So my question to you is, what else is needed? Do I need to enter a direct path in the <host></host> setting to the actual mysql databases named xbmc_video and xbmc_music? Or do I need to enter my video folders as I did in my server pc? or a combination of both?

Could you maybe give me an example of whatever I have to do?

Thanks,
Mark


- charrua - 2010-08-30

If you already followed my previous advices and authorized user xbmc to login to MySQL from every host (From Host = %), then probably you only need to open port 3306 in your MySQL server (192.168.1.6) firewall.


- mwkurt - 2010-08-30

Charrua,

"From host" is set to % and I enabled port 3306 when I installed mysql. I have looked in the windows firewall, and it looks as port 3306 is open for mySQL. Do you know of anything that I can look at or check to make sure it is open? Are there any other thing I need to do, like import my video DB into the insatnce of XBMC on the other computer?

Thanks,
Mark


- charrua - 2010-08-30

mwkurt Wrote:Charrua,

"From host" is set to % and I enabled port 3306 when I installed mysql. I have looked in the windows firewall, and it looks as port 3306 is open for mySQL. Do you know of anything that I can look at or check to make sure it is open? Are there any other thing I need to do, like import my video DB into the insatnce of XBMC on the other computer?

Thanks,
Mark
Try to connect to the MySQL server from the other computer with HeidiSQL.
If you still have problems connecting post a new debug log.


- mwkurt - 2010-08-30

Charrua,

Since my last post I have tried something else. The profile for port 3306 in windows firewall was set "private", so I changed it to "public", and then went and opened XBMC in the other computer. It looks as if it may be loading something as it is acting like it is frozen. If that doesn't work, I'll try what you have told me here.

Thanks,
Mark


- mwkurt - 2010-08-30

Charrua,

Well that wasn't it, but I did find the problem. I had to go into Windows firewall and put a checkmark into the box for mySQL that said "home/work (private)". As it was, only "public" box had a check in it. That seems to have done the trick!

Thanks again,
Mark


- charrua - 2010-08-31

mwkurt Wrote:Charrua,
Well that wasn't it, but I did find the problem. I had to go into Windows firewall and put a checkmark into the box for mySQL that said "home/work (private)". As it was, only "public" box had a check in it. That seems to have done the trick!
Thanks again,
Mark
Then the problem WAS that the port was not open...
Good work.


- ijhammo - 2010-09-01

charrua Wrote:The settings are stored in the central MySQL db, so you only have to adjust them once. All the players will access the same settings as long as they are accessing the same db.

Hi, the issue is not all equipment needs the same offset. The player in my lounge needs a different offset from my cinema room (different amps)