v16 Enabled MySQL - Multiple Video Source Problems Resulted
#1
Question 
1. Version(s) of Kodi - v16 RC3 & OSMC v2016.06.20 (RPi2)
2. Windows Version - Windows 7 Ultimate, SP1
3. CPU/Architecture - 64-bit
4. RAM amount (16GB)
5. Detailed Instructions to reproduce the Problem - I followed the Kodi wiki guide on setting up a MySQL server for multiple Kodi clients to use--in this case Windows v16 RC3 Kodi and OSMC 2016.06.20 on a RaspberryPi 2. Both clients indicated that it detected the MySQL database succesfully, and both automatically mapped sources to them under the Video section. However, the stand-alone TV and MOVIES options are gone from the homepage. When you try and enable them from being hidden in settings, they are greyed out. A similar post referenced this issue where someone suggested re-adding sources, so I gave that a try, but it still didn't help. Furthermore, the sources it did provide defaulted to NetBIOS smb paths, and not the static IP. When I try to change them to static IP smb paths (or add new video sources with the static IP paths), it won't accept the the username and password credentials, but when I leave as the //smb:JONDOE-PC/MOVIES path it takes the same credentials no problem. All of this is true whether I use it from the RPi2 OSMC client or the v16 RC3 client.
6. Details of all devices relevant to the problem - I noticed the "[1130](Host '192.168.1.33' is not allowed to connect to this MySQL server)" lines within the log file, but it's unclear to me what that means or what I should do since Kodi is claiming it can't connect to a source that it is simultaneously already connecting with somehow (it just won't detect it as an official source and appear on the home screen).
7. FULL Debug Log - xbmcpaste site was down, so pastebin will have to do, sorry.

What am I doing wrong here? If it helps any all of the media files are hosted on the same machine as the Kodi c16 RC3 Windows client.
Reply
#2
It's probably not much help to you because I am no mysql "guru" and can't give you instructions as to exactly what you need to do, but I had the same issue when I set up my shared library database. The wiki says that kodi will create the databases, but in my case it didn't and as indicated in your log file, I got messages saying that kodi was not connecting to the mysql database. I ended up "fiddling" with mysql, manually creating users and granting privileges until it worked. Because the online instructions were referring to command-line commands, and I have a graphical user interface, I just "gave things a go" from the menus......

If you go into mysql, do you actually have movies and shows listed in the database? If Kodi hasn't been allowed to connect, it won't actually have anything in there. Also, have a look at the users to see if there is a "kodi".

I could tell you what I did, but I wasn't concerned about limiting privileges to mysql because my server isn't connected to the internet. Obviously if yours are you won't want to be reckless with privileges. I've seen other replies from a forum member who "knows" mysql, hopefully he may see your thread and be able to help you more with some instructions.
Reply
#3
Per the wiki:

Quote:Note: If Kodi is unable to connect to the MySQL server, returning an error code [1130]:

If this occurs to you, try amending Step 2 above to read GRANT ALL ON *.* TO 'kodi'@'xxx.xxx.xxx.%'; where xxx.xxx.xxx is the first three quadrants of your home network's IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect.

Second, there will be no Movies or Tv Shows tab because you have to scan your sources into the library. If you had already had libraries from before, it does not matter. Those libraries were local to that particular installation. You have to start "fresh" mySQL libraries.
Reply
#4
Also make sure networking is up before kodi starts.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
(2016-07-27, 05:52)bilgepump Wrote: Because the online instructions were referring to command-line commands, and I have a graphical user interface, I just "gave things a go" from the menus......

If you go into mysql, do you actually have movies and shows listed in the database? If Kodi hasn't been allowed to connect, it won't actually have anything in there. Also, have a look at the users to see if there is a "kodi".

I only have a command line interface, I'm not even sure how to access a GUI for MySQL, so I have no idea how to even verify what you're describing, sorry.
Reply
#6
(2016-07-27, 13:41)nickr Wrote: Also make sure networking is up before kodi starts.

Yeah. i have the "wait for network" setting enabled already at startup.
Reply
#7
(2016-07-27, 13:29)helta Wrote: Per the wiki:

Quote:Note: If Kodi is unable to connect to the MySQL server, returning an error code [1130]:

If this occurs to you, try amending Step 2 above to read GRANT ALL ON *.* TO 'kodi'@'xxx.xxx.xxx.%'; where xxx.xxx.xxx is the first three quadrants of your home network's IP address (192.168.1 for example) and % as the last quadrant to allow addresses on the same subnet to connect.

Second, there will be no Movies or Tv Shows tab because you have to scan your sources into the library. If you had already had libraries from before, it does not matter. Those libraries were local to that particular installation. You have to start "fresh" mySQL libraries.

I tried the alternative MySQL command suggested, and now instead of the 1130 error, I got this error:
Quote:ERROR: Unable to open database: MyVideos87 [1044](Access denied for user 'kodi'@'%' to database 'myvideos87')
Also, I added sources for both Movies and TV Shows after successfully connected to smb shared drives with static IP addresses. Still no luck in getting MOVIES and TV SHOWS to reappear as options, though. They're still greyed out in settings as well. It appears I'm by no means alone in this occurrence, either.
Reply
#8
Have you followed this step (which assumes the mysql user you want to use is kodi and their mysql password is kodi)
Code:
Enter the following commands:
Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
Type in: GRANT ALL ON *.* TO 'kodi'; and press return
Type in: flush privileges; and press return
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
(2016-07-29, 01:17)nickr Wrote: Have you followed this step (which assumes the mysql user you want to use is kodi and their mysql password is kodi)
Code:
Enter the following commands:
Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
Type in: GRANT ALL ON *.* TO 'kodi'; and press return
Type in: flush privileges; and press return

Yeah, I tried that with the MySQL guide on the wiki and it seemed to work fine. I just tried it again though and got the follwing:

Quote:ERROR 1396 : Operation CREATE USER failed for 'kodi'@%'
Reply
#10
Also noticed from your log that you specify 192.168.1.33 as the mysql server address (lines 29 & 36).
Code:
<host>192.168.1.33</host>

You are also trying to connect from the same address - line 379 and on
Code:
23:18:56 T:2000   ERROR: Unable to open database: MyMusic56 [1130](Host '192.168.1.33' is not allowed to connect to this MySQL server)

So this log is from the same machine that hosts the MySQL database?

Finally you are on 16RC3, can you try from 16.1?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#11
(2016-07-29, 01:23)foogama Wrote:
(2016-07-29, 01:17)nickr Wrote: Have you followed this step (which assumes the mysql user you want to use is kodi and their mysql password is kodi)
Code:
Enter the following commands:
Type in: CREATE USER 'kodi' IDENTIFIED BY 'kodi'; and press return
Type in: GRANT ALL ON *.* TO 'kodi'; and press return
Type in: flush privileges; and press return

Yeah, I tried that with the MySQL guide on the wiki and it seemed to work fine. I just tried it again though and got the follwing:

Quote:ERROR 1396 : Operation CREATE USER failed for 'kodi'@%'

Possibly because the kodi user is already created. Do the following two lines and see what happens (ie Grant and flush)
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#12
(2016-07-29, 00:53)foogama Wrote: I only have a command line interface, I'm not even sure how to access a GUI for MySQL, so I have no idea how to even verify what you're describing, sorry.
First of all, I'll repeat what I told you before. I am just a user, I don't know beyond what I have figured out to use my computers, and to "fix things" I've come across. I won't be the slightest bit offended if you choose not to bother with anything I tell you, and to wait for somebody who "really knows" to help you(EDIT Nickr already is). I tend to "give things a go" to see what happens/learn, but I realise that it's different when you don't want to break what is already working.

Do you have PHPMyAdmin on your raspberry pi? When my mysql installation encountered the same issues you are having, I installed/enabled it on my NAS on which I have mysq. I wasn't capable of accessing a database via command line, nor understanding what I was accessing, I can do "basic stuff", but nothing beyond that. PHPMyAdmin provides a web-based graphical user interface to the databases you've got. You can see the databases, and what (if anything) is in them, and you have tabs to look at what users you have, what privileges they have and all that sort of thing.

I've looked on youtube, and there are tutorials as to how to install it on a raspberry pi, if you wanted to.

As for your access error, the database program has "global privileges" and "database privileges". I ended up manually creating the user, and giving it all privileges both global and to the xbmc database/s. Although I checked all boxes for privileges, giving the "grant" privilege needed an extra box ticked. As I said, I don't really know the database management, I just enabled everything and it ended up working eventually.

(Just one thing, when I was using Kodi prior to V17, I was using user xbmc password xbmc. Kodi/kodi didn't work for me, until Krypton. I don't know why)
Reply
#13
Okay, flush privileges resulted in "Query OK, 0 rows affected <0.00 sec>" still no dice in Kodi, though.

I think I'm just going to obliterate All MySQL databases, uninstall Kodi, start fresh, and see what happens. This seems hopeless so far, but I'll report back once I try again.
Reply
#14
Okay, a complete reinstall of Kodi v16.1 on Windows 7 had a favorable outcome, but OSMC on the RPi2 still isn't onboard--I did a complete reinstall there too just for good measure.

Here is the osmc log: http://paste.osmc.io/kobonepiqi

I suspected this is the crux though:
Quote:21:58:00 17.040609 T:1956610992 ERROR: Unable to open database: MyMusic32 [1049](Unknown database 'mymusic32')
21:58:04 20.464289 T:1956610992 ERROR: Unable to open database: MyVideos99 [1049](Unknown database 'myvideos99'

I have "Wait for network" enabled at start-up, I successfully enabled MySQL through the OSMC menu (and verified the advancedsettings.xml was correct via ssh) , I have the Import Watched State/Import Resume Points enabled, and I added all the right sources using static ip paths. OSMC did retain any of the bookmarks or watched states.
Reply
#15
I spot another Star Wars Despecialised fan!!
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply

Logout Mark Read Team Forum Stats Members Help
Enabled MySQL - Multiple Video Source Problems Resulted0