Page 1 of 1

[SOLVED] "MythTV could not connect to the database"

Posted: Wed Nov 12, 2014 1:41 pm
by tvuk
My instance of MythTV (latest version, running on Mythbuntu) shows me on startup the screen from which I select my country/language and next says "could not connect to the database" and prompts me to "OK" the database config settings.
From that point on, it all seems to work fine and can connect successfully.
But if I (cleanly) restart the machine, it goes back to asking me to pick my country/language and again "could not connect to the database"

Re: "MythTV could not connect to the database"

Posted: Wed Nov 12, 2014 4:59 pm
by wesnewell
I've got a frontend box using an SSD drive that does the same thing because it boots too fast for the network to initialize in time I guess. I just hit Escape a couple of times so it reloads and works fine after that. Not enough of a bother for me to fix, but you could put a few seconds wait in the boot process before mythfrontend starts if it bothers you.

Re: "MythTV could not connect to the database"

Posted: Wed Nov 12, 2014 11:41 pm
by tvuk
Thanks!
I have an SSD too. I put this into my /usr/bin/mythfrontend and now its better:

Code: Select all

# sleep if network initialisation is incomplete
ping -c2 192.168.0.3 > /dev/null
if [ $? -ne 0 ]
then 
	sleep 3
fi

Re: [SOLVED] "MythTV could not connect to the database"

Posted: Thu Nov 13, 2014 11:46 am
by stuarta
I had the same thing. I came to the conclusion that Network Manager was too slow setting up the interface, so I went back to the traditional /etc/network/interfaces way of configuring my network. That works just fine as well.