Win Unable to open database:MyVideos60[2003](Can't connect to MySQL server on 'localhost'
#1
]Hi All,

Please bare with me and I ask for your patience as I am a noob to this and certainly no IT guru.

I've been using XBMC on several devices for a while an love it but have recently taken the plunge to get my databases centralised. I have 3 units, 1 acer revo 3700 running openELEC, and 2 windows 7 PC's (one 32bit Home premium and one 64bit ultimate). All 3 are running XBMC 11 eden.

I have all my media stored on a readynas NV+ version 1 (1024MB RAM upgrade) which has myphpadmin, mysqlon and php5 addons all running.

I seem to have eventually done all the requirements with sources.xml and advancedsettings.xml files and copied them to all 3 devices but I have several issues (incidentally I am using all SMB protocols for my sources and / not \.....my databases don't seem to be updating when I start/stop movies and resume on another device and all 3 instances of XBMC are running really slowly. when I start a second device with xbmc running it populates the Videos section with my movies but I don't get a tab on the homescreen to go directly to Movies but have to navigate through the files option underneath videos to view what is available, that is unless i update the source and set scrapers for the movies source (will this be mucking it up maybe...should I just leave it?..presumably I don't just have a master PC that I have to use to update librarys and scrape movie info?)

I have also added the pathsubstitution script in the advancedsettings.xml for thumbnail sharing.

I have checked the XBMC logs and am getting the ERROR: Unable to open database: MyVideos60 [2003](Can't connect to MySQL server on 'localhost' (10061)). Is this anything to worry about? as I seemed to have this error when I did the setup and the databases created OK on mysql. I have forwarded port 3306 on my router to the NAS (not sure if i need to do this!) and I have tested with all firewalls off on local machines....I have read hundreds of posts on various sites but don't seem to be able to find a definitive answer.

i have myphpadmin setup using host name localhost
server socket as /var/run/mysqld/mysqld.sock
conection type: socket
php extension :mysqli
connect without password ticked and allow logins without password ticked.

I have used localhost in advancedsettings.xml, port 3306, user xbmc and password xbmc

Hope someone can help

xbmc log
http://pastebin.com/embed_js.php?i=fae7Ey8F

sources.xml
http://pastebin.com/embed_js.php?i=yR167iRK

advancedsettings.xml
http://pastebin.com/embed_js.php?i=WH3NJtpL

Matt
Reply
#2
I have been running XBMC and and mysql for some time now. I see that you are running some form of linux.
My network is all windows based with one Ubuntu box

My server is running Server 2008 and I have xampp installed.

There are a few questions that come to mind about your setup.
I see that you have left out the name of the database that you want XBMC to use, See Below... My setup
<videodatabase>
<type>mysql</type>
<host>192.168.1.105</host>
<port>3306</port>
<user>MyuserName</user>
<pass>*********</pass>
<name>xbmc_video</name>
</videodatabase>

Second... The name "localhost" is a reserved name. You can not use the host name "localhost"
Thats the same as 127.0.0.1 - Home for all computers
Give your box that is running MySql a different name and change it in all Advanced Settings, All XBMC Installations

Third... If I read correctly, you have setup your MySql database so that it can be accessed without using a password but,
You are supplying a username and password in your advanced settings...

Just some thoughts, I hope you get it working. I really enjoy the added features that a central database brings to XBMC
Reply
#3
Hi Idoxlr8,
Thanks for your reply.

Apparently with XBMC eden you no longer need to specify a database name in advancedsettings so I left it out as per http://wiki.xbmc.org/index.php?title=HOW...ng_up_XBMC ...The tables have built themselves in mysql

I read an article that said when using a readynas you need to use the name localhost. article at http://readynasxtras.com/faq/10

The no password thing I believe is just to get access to mysql...the xbmc user name and password is so xbmc is allowed to write to the tables as per http://www.youtube.com/watch?v=U6PPouAnnpY

Kind regards,

Matt
Reply
#4
(2012-12-30, 16:04)ru5ell75 Wrote: (...) I read an article that said when using a readynas you need to use the name localhost. article at http://readynasxtras.com/faq/10 (...)

Hi Matt,

as Idoxlr8 already stated: localhost as stated in your advancedsettings.xml can't work on any client as long as it is not the client itself that's hosting the MySQL-DB.

If you have a DNS-server running in your local network, you might use NAS-01-AA-90 as stated in your sources.xml - as long as this really is the NAS's name.

To test: open up a cmd on a client and type
Code:
ping NAS-01-AA-90

If you get replies stating the roundtrip time of these ICMP-packets, you might go with NAS-01-AA-90 instead of localhost for the database definition (and I just mean your XBMC-clients, it might be ok for the NAS itself).

[EDIT1: read the article you linked to, and the NAS itself really needs 'localhost'.]

Anyway, if not, you MUST use your NAS's IP address instead (which is more fail-safe) - something like 192.168.1.2, depends on your local subnet.

'localhost' is always bound to 127.0.0.1 on any computer that's capable of IPv4 (or ::1 for v6); it's merely a local-only virtual loopback interface making it possible for the OS and applications to use standard networking protocols on any computer without even being connected to a real network.

(Try the ping-thing from above again: type 'ping localhost' on any client you like, all will answer with 127.0.0.1, which is NOT the address they need to use for communication with other clients...)
Bye,
Fry
Kodi v17.6 with shared MariaDB v10.3 | HTS Tvheadend 4.2.6 on RPi2 | running on:
Windows 10x64 | Nvidia Shield | FireTV4k | FireTVStick4 | Android 5 | RPi3 with OSMC
Reply
#5
SOLVED...........

With a little fiddling I sussed out that the hostname in phpmyadmin needs to be local host but the host tag in advancedsettings needs to be the IP address of the box hosting all the media files,,,in my case the NAS @ 192.168.1.157.

Hope this helps someone else in the future...

Thanks for reading
Reply
#6
I was going to post and point out that you totally read that site wrong, but you figured it out. Then I read the site: Wow. They charge for stuff like SABNzbd, Couchpotato, and the like. I wonder of the authors of those fine (free) programs are aware of this.
Reply
#7
ixian,
Do you have a link to where the mentioned programs are available free please?

Matt
Reply

Logout Mark Read Team Forum Stats Members Help
Unable to open database:MyVideos60[2003](Can't connect to MySQL server on 'localhost'1