2014-07-01, 20:17
I have a mixture of devices with a shared database on a (soon to be) headless mythtv and SMB linux server. I add new content to my server frequently by various methods, some are completely automated. For some of my less beefy client devices, (i.e. Raspberry Pi's) updating the shared database from the client side can degrade performance until the update is complete.
I found this page on the wiki for updating the library by remote. My plan was to use the command line option below to schedule a cron job to periodically update the database right there on the server, making it optional for the clients.
However, when I tested the command, I got the following:
I got the same result when I changed localhost to the actual IP address for the server.
I also tried using the port number listed in my advancedsettings.xml file and got the following:
Based on the output above, I thought that I had managed to connect to the database by changing the port number. So, I looked at the man page for the curl command and added what I thought was a means of entering username and password credentials into the command (-u xbmc:xbmc) below:
I got the following (equally cryptic, but slightly different) error:
Any thoughts?
P.S. Keep in mind that this is also a MythTV backend whose database also uses MySQL. The two databases seem to get along just fine, but I don't want to break anything.
I found this page on the wiki for updating the library by remote. My plan was to use the command line option below to schedule a cron job to periodically update the database right there on the server, making it optional for the clients.
Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:9191/jsonrpc
However, when I tested the command, I got the following:
Code:
curl: (7) couldn't connect to host
I also tried using the port number listed in my advancedsettings.xml file and got the following:
Code:
5.5.37-0ubuntu0.12.04.1b�01DB\+]s��NhBQNu$M;}'Emysql_native_password!��#08S01Got packets out of order
Based on the output above, I thought that I had managed to connect to the database by changing the port number. So, I looked at the man page for the curl command and added what I thought was a means of entering username and password credentials into the command (-u xbmc:xbmc) below:
Code:
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' -u xbmc:xbmc http://localhost:3306/jsonrpc
I got the following (equally cryptic, but slightly different) error:
Code:
5.5.37-0ubuntu0.12.04.1�Y8MZ^I4c��yW)a0h=7:\Bvmysql_native_password!��#08S01Got packets out of order
Any thoughts?
P.S. Keep in mind that this is also a MythTV backend whose database also uses MySQL. The two databases seem to get along just fine, but I don't want to break anything.