I have three Raspberry Pi units and two Raspberry Pi 2 units all with the same version of OSMC installed. They are all connected in a wired fashion to the same network. They all use the same advancedsettings.xml file. The Pi units connect to the MySQL database just fine. The Raspberry Pi 2 units did as well until I rebooted them. Now they do not. I have included a log from one of the units. Does anyone know how to fix this so that they connect again?
10:51:09 10.353725 T:1958249008 ERROR: Unable to open database: xbmc_music52 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354048 T:1958249008 ERROR: Unable to open database: xbmc_music51 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354227 T:1958249008 ERROR: Unable to open database: xbmc_music50 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354385 T:1958249008 ERROR: Unable to open database: xbmc_music49 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354539 T:1958249008 ERROR: Unable to open database: xbmc_music48 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354691 T:1958249008 ERROR: Unable to open database: xbmc_music47 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354838 T:1958249008 ERROR: Unable to open database: xbmc_music46 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.354989 T:1958249008 ERROR: Unable to open database: xbmc_music45 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355137 T:1958249008 ERROR: Unable to open database: xbmc_music44 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355286 T:1958249008 ERROR: Unable to open database: xbmc_music43 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355433 T:1958249008 ERROR: Unable to open database: xbmc_music42 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355643 T:1958249008 ERROR: Unable to open database: xbmc_music41 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355799 T:1958249008 ERROR: Unable to open database: xbmc_music40 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.355947 T:1958249008 ERROR: Unable to open database: xbmc_music39 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356096 T:1958249008 ERROR: Unable to open database: xbmc_music38 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356243 T:1958249008 ERROR: Unable to open database: xbmc_music37 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356390 T:1958249008 ERROR: Unable to open database: xbmc_music36 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356537 T:1958249008 ERROR: Unable to open database: xbmc_music35 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356685 T:1958249008 ERROR: Unable to open database: xbmc_music34 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356833 T:1958249008 ERROR: Unable to open database: xbmc_music33 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.356980 T:1958249008 ERROR: Unable to open database: xbmc_music32 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357127 T:1958249008 ERROR: Unable to open database: xbmc_music31 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357275 T:1958249008 ERROR: Unable to open database: xbmc_music30 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357420 T:1958249008 ERROR: Unable to open database: xbmc_music29 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357566 T:1958249008 ERROR: Unable to open database: xbmc_music28 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357712 T:1958249008 ERROR: Unable to open database: xbmc_music27 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.357858 T:1958249008 ERROR: Unable to open database: xbmc_music26 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358006 T:1958249008 ERROR: Unable to open database: xbmc_music25 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358151 T:1958249008 ERROR: Unable to open database: xbmc_music24 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358297 T:1958249008 ERROR: Unable to open database: xbmc_music23 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358444 T:1958249008 ERROR: Unable to open database: xbmc_music22 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358589 T:1958249008 ERROR: Unable to open database: xbmc_music21 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358734 T:1958249008 ERROR: Unable to open database: xbmc_music20 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.358880 T:1958249008 ERROR: Unable to open database: xbmc_music19 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359027 T:1958249008 ERROR: Unable to open database: xbmc_music18 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359167 T:1958249008 ERROR: Unable to open database: xbmc_music52 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359226 T:1958249008 ERROR: Unable to create new database
10:51:09 10.359424 T:1958249008 ERROR: Unable to open database: xbmc_video93 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359575 T:1958249008 ERROR: Unable to open database: xbmc_video92 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359723 T:1958249008 ERROR: Unable to open database: xbmc_video91 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.359871 T:1958249008 ERROR: Unable to open database: xbmc_video90 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360128 T:1958249008 ERROR: Unable to open database: xbmc_video89 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360318 T:1958249008 ERROR: Unable to open database: xbmc_video88 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360473 T:1958249008 ERROR: Unable to open database: xbmc_video87 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360625 T:1958249008 ERROR: Unable to open database: xbmc_video86 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360772 T:1958249008 ERROR: Unable to open database: xbmc_video85 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.360919 T:1958249008 ERROR: Unable to open database: xbmc_video84 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361066 T:1958249008 ERROR: Unable to open database: xbmc_video83 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361212 T:1958249008 ERROR: Unable to open database: xbmc_video82 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361359 T:1958249008 ERROR: Unable to open database: xbmc_video81 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361506 T:1958249008 ERROR: Unable to open database: xbmc_video80 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361652 T:1958249008 ERROR: Unable to open database: xbmc_video79 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361800 T:1958249008 ERROR: Unable to open database: xbmc_video78 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.361952 T:1958249008 ERROR: Unable to open database: xbmc_video77 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362102 T:1958249008 ERROR: Unable to open database: xbmc_video76 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362247 T:1958249008 ERROR: Unable to open database: xbmc_video75 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362394 T:1958249008 ERROR: Unable to open database: xbmc_video74 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362542 T:1958249008 ERROR: Unable to open database: xbmc_video73 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362688 T:1958249008 ERROR: Unable to open database: xbmc_video72 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362835 T:1958249008 ERROR: Unable to open database: xbmc_video71 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.362983 T:1958249008 ERROR: Unable to open database: xbmc_video70 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363130 T:1958249008 ERROR: Unable to open database: xbmc_video69 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363278 T:1958249008 ERROR: Unable to open database: xbmc_video68 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363424 T:1958249008 ERROR: Unable to open database: xbmc_video67 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363570 T:1958249008 ERROR: Unable to open database: xbmc_video66 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363719 T:1958249008 ERROR: Unable to open database: xbmc_video65 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.363865 T:1958249008 ERROR: Unable to open database: xbmc_video64 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364012 T:1958249008 ERROR: Unable to open database: xbmc_video63 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364158 T:1958249008 ERROR: Unable to open database: xbmc_video62 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364305 T:1958249008 ERROR: Unable to open database: xbmc_video61 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364452 T:1958249008 ERROR: Unable to open database: xbmc_video60 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364634 T:1958249008 ERROR: Unable to open database: xbmc_video93 [2003](Can't connect to MySQL server on '10.0.0.11' (101))
10:51:09 10.364696 T:1958249008 ERROR: Unable to create new database
Did you follow the directions in the wiki tutorial for granting permissions in MySQL?
Since it works with the other three Pi units and it used to work with the Pi 2 units until I rebooted them, I would assume that the permissions are granted correctly in MySQL. Would you concur?
This means the MySQL server refused or did not respond to a TCP connection on port 3306.
This is either a network configuration issue or a mysql configuration issue on the MySQL server.
Check that all your machines have the same subnet mask, and also check your my.cnf file on the server to make sure that the mysql server allows connections from any local IP address.
Have you done basic tests like trying to ping the mysql server from the client ? What about if you try to telnet to port 3306 of the server, do you get any response ?
The Pi is connected to the network. It was working fine until it was rebooted. I can play videos through it so it is for sure connected to my network. It just does not login to the MySQL server as indicated by the log that I attached. Ignore all of the failure to connect to a Video table. Kodi loops through all of the versions of tables until it finds the one it needs.
I have attached the Pi to a different location and the same results as above occur. But like I said I can play the videos located on the network so that proves the network is not the issue.
The power adapter is a 2.5A adapter.
Now I have two Raspberry Pi 2 units that do not connect to the database. The Raspberry Pi units work fine. I have tried putting on a fresh install of OSMC with the same results.
advancedsettings.xml is exactly the same on ALL of my units since I simply FTP into each device after the OSMC build is installed and copy the xml files into each. I have the same xml files on my Windows version of Kodi as well. The Windows Kodi login to MySQL no problems.
Whether or not you have connectivity to other devices on your network is kind of irrelevant - the fact remains that your MySQL server is refusing the connection, so you need to find out why that is.
Did you try pinging the mysql server from the affected device as I suggested, and try telneting to port 3306 ? Did you check the netmasks as I suggested ?
You have a basic networking or server configuration issue here. MySQL is very particular about it’s configuration and by default does not allow connections from all IP addresses.
A reboot could have lead to the IP lease for the device changing, it may be on an IP address now that is preventing it from connecting. (Hence the suggestions I made above)
I will move the device to other network ports to see what happens. That is easy enough. The lease on the ip address does not change since my DHCP server has a fixed ip address to these devices based on the MAC address. Thus, the ip address never changes.
How do I telnet from raspberry pi. As far as raspberry pi is concerned I am just a user. I know nothing about Linux and have very limited experience with telnet. I will happily try your suggestions to troubleshoot if you help me with how to do it.
I will try the other things that you suggested and get back.
Thanks for the direct answer. However, looking at the Options File | Logging page I see that general-log is not turned on. Just log-error is turned on. I will turn on general-log and reboot the pi 2 units tonight to see if a useful log is created. I do not think that this is a problem with MySQL unless it is specific to a raspberry pi 2 unit. I do not have any problems with raspberry Pi units, just Pi 2 units.