Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: mythtv and mysql (database not open)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Tue Nov 14, 2006 9:01 pm    Post subject: SOLVED: mythtv and mysql (database not open) Reply with quote

hi
i have a problem with mythtv communicating with mysql-5.0.26-r1. mysql got upgraded yesterday from 4 to 5 since it is in the stable tree ... i have already run revdep-rebuild afterwards
Code:

[ebuild   R   ] dev-db/mysql-5.0.26-r1  USE="berkdb latin1 perl ssl -big-tables -cluster -debug -embedded -extraengine -max-idx-128 -minimal (-selinux) -srvdir -static" 0 kB
[ebuild   R   ] media-tv/mythtv-0.20_p11626 [0.20_p11244] USE="alsa debug dvb dvd lirc mmx perl vorbis (-altivec) -backendonly -crciprec -dbox2 -dts -freebox -frontendonly -hdhomerun -ieee1394 -ivtv% -jack -joystick -lcd -opengl -xvmc" VIDEO_CARDS="-i810 -nvidia -via" 0 kB

tail -n20 /var/log/mythtv/mythbackend.log
Code:

...
QSqlQuery::exec: database not open
mythshutdown: Could not initialize myth context. Exiting.
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
mythshutdown: Could not initialize myth context. Exiting.
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open


this log results from the command mythshutdown which gets called by mythwelcome to set nvram-wakeup and poweroff the computer. Watching TV works. Sometimes Mythwelcome does not recognise set timers for recordings. Without nvram-wakeup my box is worthless for me. Pls help


Last edited by schitthoch3 on Tue Nov 28, 2006 6:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
vivi131313
Tux's lil' helper
Tux's lil' helper


Joined: 11 May 2004
Posts: 108
Location: Folsom, CA

PostPosted: Thu Nov 16, 2006 6:39 pm    Post subject: Try this Reply with quote

I'm assuming you're running your frontend on the same machine as your back end. If that's the case then try changing the address both in your mythtv-setup and in the general settings in your frontend from localhost to 127.0.0.1. I had a similar problem and I eventually came to this solution. I hope this helps.

[EDIT]: I should try reading your entire post. I missed this part:
Quote:

Watching TV works


Sorry about that, I have a feeling my suggestion won't be of any help. Nonetheless, good luck.[/quote]
_________________
Now I make the stuff you get pissed off at.
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Fri Nov 17, 2006 12:53 pm    Post subject: Reply with quote

yeah,
i have 192.168.2.1xx for my frontend-backend-box and watching tv does work from a frontend client too . so it should be another problem
Back to top
View user's profile Send private message
Hobbes-X
l33t
l33t


Joined: 04 Feb 2004
Posts: 823
Location: Seattle, WA

PostPosted: Fri Nov 17, 2006 4:58 pm    Post subject: Reply with quote

Have you tried running mythshutdown separately with the --verbose flag? Might give you some more helpful terminal output that way.
Back to top
View user's profile Send private message
ShadowIce
n00b
n00b


Joined: 12 May 2002
Posts: 20
Location: Germany

PostPosted: Fri Nov 17, 2006 11:34 pm    Post subject: Reply with quote

I had a slightly different problem after upgrading to mysql 5. That's what the log said:

Code:

QSqlDatabase: QMYSQL3 driver not loaded
QSqlDatabase: available drivers:
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open


The only thing I had to do was re-emerging qt3. Maybe that helps.
_________________
Go on, prove me wrong. Destroy the fabric of the universe. See if I care.
-- Terry Pratchett
Back to top
View user's profile Send private message
gzunk
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2003
Posts: 149
Location: Dunblane, Scotland

PostPosted: Sat Nov 18, 2006 1:32 pm    Post subject: Reply with quote

ShadowIce wrote:
The only thing I had to do was re-emerging qt3. Maybe that helps.


I'm having the same problem, but what do you mean qt3? I have qt 4.x or whatever...
_________________
Intel Core 2 Quad Q9650 | Asus P5K | 8GB DDR-2 800
Sapphire Radeon 4870 X2 | 30" Samsung SM305T+
(4xSATA) 3 TB | 2 x DVD+-RW DL (Pioneer 112D 115D)
Logitech X-530 5.1 | DiNovo Edge | MX Revolution
Back to top
View user's profile Send private message
ShadowIce
n00b
n00b


Joined: 12 May 2002
Posts: 20
Location: Germany

PostPosted: Sat Nov 18, 2006 1:51 pm    Post subject: Reply with quote

gzunk wrote:

I'm having the same problem, but what do you mean qt3? I have qt 4.x or whatever...


I have qt 3.3.6 and 4.1.4 installed and 3.3.6 is the one that is used by mythtv.
_________________
Go on, prove me wrong. Destroy the fabric of the universe. See if I care.
-- Terry Pratchett
Back to top
View user's profile Send private message
gzunk
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2003
Posts: 149
Location: Dunblane, Scotland

PostPosted: Sat Nov 18, 2006 2:06 pm    Post subject: Reply with quote

How can I get 3.3.6 installed as well then? Star Trek is on at the moment and I normally record it... and I'm missing it!

I've checked and I also have 3.3.6 installed, I am forcing an emerge of this using porthole because I don't know the command line to do it. Do you think it will solve my problem?

Code:

thomsona@barney ~ $ mythfrontend
2006-11-18 14:07:40.649 Using runtime prefix = /usr
2006-11-18 14:07:40.669 XScreenSaver support enabled
QSqlDatabase: QMYSQL3 driver not loaded
QSqlDatabase: available drivers: QPSQL7
2006-11-18 14:07:40.700 New DB connection, total: 1
2006-11-18 14:07:40.700 Unable to connect to database!
2006-11-18 14:07:40.700 No error type from QSqlError?  Strange...
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2006-11-18 14:07:40.752 DB Error (KickDatabase):


Success, I re-emerged 3.3.6, shutdown mysql and mythbackend, then restarted and it's all back.
_________________
Intel Core 2 Quad Q9650 | Asus P5K | 8GB DDR-2 800
Sapphire Radeon 4870 X2 | 30" Samsung SM305T+
(4xSATA) 3 TB | 2 x DVD+-RW DL (Pioneer 112D 115D)
Logitech X-530 5.1 | DiNovo Edge | MX Revolution
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Sat Nov 18, 2006 4:09 pm    Post subject: Reply with quote

To learn the command line. In porthole's advanced emerge dialog (version -0.5.0) it shows the "Command Preview". Select a different version and it will show you how it tells emerge to emerge that specific version among oither things. That way you won't be stuck and only able to use porthole. You won't be able to use porthole if your desktop has crashed and won't run. You will be forced to do things from the console/command line.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
ShadowIce
n00b
n00b


Joined: 12 May 2002
Posts: 20
Location: Germany

PostPosted: Sun Nov 19, 2006 2:14 am    Post subject: Reply with quote

And for the records, the best way to re-emerge qt-3 is (imho):
Code:

emerge -a --oneshot =qt-3*

_________________
Go on, prove me wrong. Destroy the fabric of the universe. See if I care.
-- Terry Pratchett
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Nov 20, 2006 4:40 am    Post subject: Reply with quote

That worked for me too and I have my master backend on a second box running myysql4.

I was just about downgrade mysql my masking it in my /etc/portage/package.mask but this worked fine. Thanks.

[EDIT]Well since it has broken a few other packages that I can't figure out how to fix. I am going to downgrade.[/EDIT]
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Nov 21, 2006 12:31 pm    Post subject: Reply with quote

drescherjm wrote:
That worked for me too and I have my master backend on a second box running myysql4.

I was just about downgrade mysql my masking it in my /etc/portage/package.mask but this worked fine. Thanks.

[EDIT]Well since it has broken a few other packages that I can't figure out how to fix. I am going to downgrade.[/EDIT]


So you have a frontend running mysql5 and a backend running mysql4?

I got into this situation because my backend is on amd64, and my main frontend is on x86, and the latter upgraded to 5 while the former stayed on 4, for a few weeks. The frontend quit working a few weeks back when that happened. I tracked down the mysql version mismatch, and assumed that it was a no-no. So I masked and rebuilt on the frontend, and everything worked. Later mysql5 came out on amd64, but I've left everything masked back to mysql4.

Maybe I'll read this thread more carefully and bring everything up to date.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Tue Nov 21, 2006 2:24 pm    Post subject: Reply with quote

Quote:
So you have a frontend running mysql5 and a backend running mysql4?


I had and it worked fine for the few hours I had it setup that way. I successfully used mytharchive, edited a few shows and watched a part of a few shows. I have since downgraded as knoda did not work and some other package (which I can not remember) was also broken...
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Thu Nov 23, 2006 10:55 pm    Post subject: Reply with quote

ok guys
so i did a
Code:
emerge -a --oneshot =qt-3*
again. and after that another revdep-rebuild (which did not find anything to recompile). So in fact i did this now 2 times, because thats what i did before i made the first post (but then revdep-rebuild did recompile mythtv, i think).

It does not work (which means: still the same problem).

how do i get down to mysql4 now (what version should i put in package.mask?
what needs to recompile afterwards?

thanks

chris
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Thu Nov 23, 2006 11:52 pm    Post subject: Reply with quote

Put this in package mask:
Code:

>dev-db/mysql-5.0


Then recompile mysql

Code:
emerge -av mysql


If you have problems after that emerge qt-3 as above
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Fri Nov 24, 2006 12:14 am    Post subject: Reply with quote

depontius wrote:
So you have a frontend running mysql5 and a backend running mysql4?
I got into this situation because my backend is on amd64, and my main frontend is on x86, and the latter upgraded to 5 while the former stayed on 4, for a few weeks.


That's odd, because my frontend (amd64 with -frontendonly USE flag) worked fine with the backend using mysql 5 for about 5 days (or however long it was).
I was aware it was going to cause grief though, and instead of updating (-uDNav), emerged mysql 5, checked the database was cool (googled gentoo mysql upgrade), emerged qt-3* and then re-emerged mythtv, which was due an upgrade anyhow (well, I'd just rebuilt qt3, it made sense at the time.)

To put a dent in my smug 'It works OK here' story, I did lose amarok for a while, and had to downgrade mythtv again 'cos it segfaulted on the second recorded show I tried to watch, each time.

Hell, I haven't watched live TV in months, I'd hate to think how much it would cost in whiskey if mythtv stopped working.
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Sat Nov 25, 2006 2:04 pm    Post subject: Reply with quote

@drescherjm
ok, here we go. i masked >mysql-5.0, compiled mysql 4. can't connect to database now. like you suggested i wanted to recompile qt3, but now qt3 seems to depend on mysql5.
Code:
pundit ~ # emerge -a --oneshot =qt-3*

These are the packages that would be merged, in order:

Calculating dependencies \
!!! All ebuilds that could satisfy "=dev-db/mysql-5.0*" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-db/mysql-5.0.26-r1 (masked by: package.mask)
#>=media-tv/ivtv-0.8


For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "virtual/mysql-5.0" [ebuild])

Code:

pundit ~ # emerge -C virtual/mysql-5.0

--- Couldn't find 'virtual/mysql-5.0' to unmerge.

>>> No packages selected for removal by unmerge.


:arrow: EDIT: solved with
Code:
emerge =virtual/mysql-4.1
emerge -a --oneshot =qt-3*
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Sat Nov 25, 2006 2:50 pm    Post subject: Reply with quote

Quote:
ok, here we go. i masked >mysql-5.0, compiled mysql 4. can't connect to database now. like you suggested i wanted to recompile qt3, but now qt3 seems to depend on mysql5.

Thats interesting. I did not have to do that to downgrade back to mysql4. Thanks for the follow up.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Sat Nov 25, 2006 5:34 pm    Post subject: Reply with quote

yeah, but:
Code:

# mythshutdown -s -v
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
mythshutdown: Could not initialize myth context. Exiting.

nothing has changed

a read a german post and there in the last post he says that it was solved by using qt3 instead of qt4. fine, i have both installed, recompiled the whole mythtv-suite
, which (i assume) takes qt3 when it's installed. so what to do now? i start to get p***ed about all this.
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Sat Nov 25, 2006 7:10 pm    Post subject: Reply with quote

Do you still get

Code:
QSqlDatabase: QMYSQL3 driver not loaded

_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Sun Nov 26, 2006 1:45 am    Post subject: Reply with quote

hi
ahm, i have never had this message in my log (see first post) ...
greetings
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Sun Nov 26, 2006 2:02 am    Post subject: Reply with quote

Sorry.

Are you 100% sure that mysql is running on the master server?

I believe if you do not get that error the problem is either that mysql is not running or the mysql configuration is wrong. Possibly that mysql is not using the correct socket or mysql is listining on the wrong ipaddress.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Mon Nov 27, 2006 8:33 pm    Post subject: Reply with quote

hm sound's quite impossible to me.
mysql is started and i can watch livetv, record if the frontend (same box) is started, listen to music, watch videos etc. (simply every functionality mythtv and plugins give) but mythwelcome-shutdown does not work as it should.
Back to top
View user's profile Send private message
Hobbes-X
l33t
l33t


Joined: 04 Feb 2004
Posts: 823
Location: Seattle, WA

PostPosted: Tue Nov 28, 2006 6:00 pm    Post subject: Reply with quote

schitthoch3 wrote:
hm sound's quite impossible to me.
mysql is started and i can watch livetv, record if the frontend (same box) is started, listen to music, watch videos etc. (simply every functionality mythtv and plugins give) but mythwelcome-shutdown does not work as it should.


Is mythwelcome-shutdown run as root? My guess is that it's running as a different user than your regular mythtv user and it has incorrect values in a mysql.txt file in that user's home directory. You can check your regular user's home directory for one that has the correct values, and then either correct the broken one, or simlink it to the myth user's.
Back to top
View user's profile Send private message
schitthoch3
Tux's lil' helper
Tux's lil' helper


Joined: 22 Mar 2004
Posts: 94

PostPosted: Tue Nov 28, 2006 6:34 pm    Post subject: Reply with quote

Quote:
[...] and it has incorrect values in a mysql.txt file in that user's home directory [...]


GODLIKE !!!

thanks, why didn't i check for this *damn* (for the less-informed people out there: this is sort of a standard-procedure when checking for connection-problems between mythtv and mysql) . oh my god i'm really satisfied for now. that was it !!!

i used to try to run the command as root, but it failed because there was a /root/.mythtv/mysql.txt with standard settings in it.

it wasn't a mysql-problem then.

thanks man. marked thread as solved
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum