View previous topic :: View next topic |
Author |
Message |
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Tue Nov 14, 2006 9:01 pm Post subject: SOLVED: mythtv and mysql (database not open) |
|
|
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 |
|
|
vivi131313 Tux's lil' helper
Joined: 11 May 2004 Posts: 108 Location: Folsom, CA
|
Posted: Thu Nov 16, 2006 6:39 pm Post subject: Try this |
|
|
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:
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Fri Nov 17, 2006 12:53 pm Post subject: |
|
|
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 |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Fri Nov 17, 2006 4:58 pm Post subject: |
|
|
Have you tried running mythshutdown separately with the --verbose flag? Might give you some more helpful terminal output that way. |
|
Back to top |
|
|
ShadowIce n00b
Joined: 12 May 2002 Posts: 20 Location: Germany
|
Posted: Fri Nov 17, 2006 11:34 pm Post subject: |
|
|
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 |
|
|
gzunk Tux's lil' helper
Joined: 31 Aug 2003 Posts: 149 Location: Dunblane, Scotland
|
Posted: Sat Nov 18, 2006 1:32 pm Post subject: |
|
|
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 |
|
|
ShadowIce n00b
Joined: 12 May 2002 Posts: 20 Location: Germany
|
Posted: Sat Nov 18, 2006 1:51 pm Post subject: |
|
|
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 |
|
|
gzunk Tux's lil' helper
Joined: 31 Aug 2003 Posts: 149 Location: Dunblane, Scotland
|
Posted: Sat Nov 18, 2006 2:06 pm Post subject: |
|
|
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 |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Sat Nov 18, 2006 4:09 pm Post subject: |
|
|
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 |
|
|
ShadowIce n00b
Joined: 12 May 2002 Posts: 20 Location: Germany
|
Posted: Sun Nov 19, 2006 2:14 am Post subject: |
|
|
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 |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Mon Nov 20, 2006 4:40 am Post subject: |
|
|
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 |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Tue Nov 21, 2006 12:31 pm Post subject: |
|
|
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 |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Tue Nov 21, 2006 2:24 pm Post subject: |
|
|
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Thu Nov 23, 2006 10:55 pm Post subject: |
|
|
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 |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Thu Nov 23, 2006 11:52 pm Post subject: |
|
|
Put this in package mask:
Then recompile mysql
If you have problems after that emerge qt-3 as above _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
pteppic l33t
Joined: 28 Nov 2005 Posts: 781
|
Posted: Fri Nov 24, 2006 12:14 am Post subject: |
|
|
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Sat Nov 25, 2006 2:04 pm Post subject: |
|
|
@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.
|
EDIT: solved with
Code: | emerge =virtual/mysql-4.1
emerge -a --oneshot =qt-3*
|
|
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Sat Nov 25, 2006 2:50 pm Post subject: |
|
|
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Sat Nov 25, 2006 5:34 pm Post subject: |
|
|
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 |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
|
Back to top |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Sun Nov 26, 2006 1:45 am Post subject: |
|
|
hi
ahm, i have never had this message in my log (see first post) ...
greetings |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Sun Nov 26, 2006 2:02 am Post subject: |
|
|
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Mon Nov 27, 2006 8:33 pm Post subject: |
|
|
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 |
|
|
Hobbes-X l33t
Joined: 04 Feb 2004 Posts: 823 Location: Seattle, WA
|
Posted: Tue Nov 28, 2006 6:00 pm Post subject: |
|
|
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 |
|
|
schitthoch3 Tux's lil' helper
Joined: 22 Mar 2004 Posts: 94
|
Posted: Tue Nov 28, 2006 6:34 pm Post subject: |
|
|
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 |
|
|
|