Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mythtv and mysql5
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
Rikai
n00b
n00b


Joined: 05 Feb 2005
Posts: 65
Location: Huntsville, AL

PostPosted: Fri Oct 21, 2005 5:11 am    Post subject: [SOLVED] mythtv and mysql5 Reply with quote

I'm sure this was a horrible idea at some level, but anyway:

For whatever reason, I elected to take my perfectly working myth box and emerge -avuD world. More or less. Anyway, I ended up with mythtv-0.18.1-r2 and mysql-5.0.13_rc (while trying to install mysql 4.1 amusingly enough). I needed to clean up myth anyway, so I deleted all my old recorded shows, and cleaned up everything else database-y I could find.

Anyway, it took a little while, but I finally got it to the point where mythtv-setup finally worked right, and mythbackend would launch successfully. I was able to get the card and such set up, and retrieved channel listings successfully. So, I went to do a mythfilldatabase. It gets a listing, and then I get this error about a million times:
Code:

DB Error (Inserting into dd_schedule):
Query was:
INSERT INTO dd_schedule (programid,stationid,scheduletime,duration,repeat,stereo,subtitled,hdtv,closecaptioned,tvrating,partnumber,parttotal,endtime) VALUES(<obviously, these change>) ;
Driver error was [2/1064]:
QMYSQL3: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near repeat,stereo,subtitled,hdtv,closecaptioned,tvrating,partnumber,parttotal,endtim' at line 1


Is it mysql5? Or something else silly I'm missing?


Last edited by Rikai on Mon Oct 24, 2005 8:37 am; edited 1 time in total
Back to top
View user's profile Send private message
marduk
Retired Dev
Retired Dev


Joined: 20 Sep 2002
Posts: 78

PostPosted: Sun Oct 23, 2005 4:09 am    Post subject: Reply with quote

Oh, I encountered the same issue when I upgraded recently to 5.... :-(

MySQL 5 introduces the REPEAT keyword and unfortunately MythTV uses a column called "repeat".

What I did was edit datadirect.cpp from MythTV and change all the SQL code that uses

Code:
repeat


to

Code:
`repeat`


and recompiled. After I did this I discovered MySQL 5's permissions are tighter, and you have to explicitely give the mythtv user "CREATE TEMPORARY TABLE" access. I'm not sure what the syn.tax is, I did it with the mysql-administrator GUI, but you should be able to find it on the net somewhere.

Hope this helps.
-m
Back to top
View user's profile Send private message
Rikai
n00b
n00b


Joined: 05 Feb 2005
Posts: 65
Location: Huntsville, AL

PostPosted: Mon Oct 24, 2005 7:50 am    Post subject: thanks Reply with quote

A-yep, that did it. Thanks alot ;)
Back to top
View user's profile Send private message
feld
Guru
Guru


Joined: 29 Aug 2004
Posts: 593
Location: USA

PostPosted: Wed Oct 26, 2005 10:03 pm    Post subject: Reply with quote

i have this problem -- can anyone explain that solution better? how do i exit that source file and then have portage compile from it?


thx


-Feld
_________________
< bmg505> I think the first line in reiserfsck is

if (random(65535)< 65500) { hose(partition); for (i=0;i<100000000;i++) print_crap(); }
Back to top
View user's profile Send private message
Xamindar
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1155
Location: California

PostPosted: Wed Nov 16, 2005 7:25 am    Post subject: Reply with quote

feld wrote:
i have this problem -- can anyone explain that solution better? how do i exit that source file and then have portage compile from it?


thx


-Feld


X2

how do you edit the source and then emerge it?
Back to top
View user's profile Send private message
mattfite
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Mon Nov 21, 2005 7:02 am    Post subject: Reply with quote

Quote:
how do you edit the source and then emerge it?

i think you should look here

basically, you should:
Code:
#ebuild /usr/portage/media-tv/mythtv/mythtv-0.18.1-r2.ebuild unpack
#vi /var/tmp/portage/mythtv-0.18.1-r2/work/mythtv-0.18.1/libs/libmythtv/datadirect.cpp
[make changes]
#ebuild /usr/portage/media-tv/mythtv/mythtv-0.18.1-r2.ebuild install
#ebuild /usr/portage/media-tv/mythtv/mythtv-0.18.1-r2.ebuild qmerge

i'm building now with this procedure, although the first time i guess i used the wrong quote mark in the patch (the database errors persisted, although the message was different this time).
Back to top
View user's profile Send private message
fserafin
Tux's lil' helper
Tux's lil' helper


Joined: 02 Oct 2005
Posts: 126
Location: Winnipeg, Canada

PostPosted: Wed Nov 23, 2005 4:15 am    Post subject: thanks for the fix Reply with quote

thanks this fix worked great i wish they would update it in portage

Last edited by fserafin on Mon Jan 09, 2006 7:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Fri Dec 02, 2005 3:24 pm    Post subject: Reply with quote

I get issues with the file from your ftp server.

Tons of errors from things not liking other things, I'm not really sure where it's stemming from. I kind of wish the MythTV upstream developers made more smaller releases than the occasional huge one every now and then. Has anyone filed a bug report with upstream developers?
Back to top
View user's profile Send private message
mattfite
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Sat Dec 03, 2005 3:42 am    Post subject: Reply with quote

Quote:
Tons of errors from things not liking other things, I'm not really sure where it's stemming from.

That sounds a bit vague, but if it's anything like what i've been getting recently, it probably has to do with building against Qt 4. There's a gentoo bug about it here.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sat Dec 03, 2005 6:12 am    Post subject: Reply with quote

Sorry about the vaugeness, had to run off to go look at an apartment so I have a place to live next year... :p

Did a bit more research, looks like it's having issues with compiling against Qt4. Kind of a pain that the MythTV package hasn't been updated to compile against Qt3, or even better yet patched upstream to work. I kinda wish I could help development, but I don't have the time to jump into a project like that (yay college!).
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sat Dec 03, 2005 2:31 pm    Post subject: Reply with quote

Ok, finally got around to getting this going, looks like it's working so far. Thanks for the help!
Back to top
View user's profile Send private message
Xamindar
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1155
Location: California

PostPosted: Sun Dec 04, 2005 8:57 pm    Post subject: Reply with quote

Ok this fix DOES work but I am having another problem now and it might be related.

I haven't done much testing but it seems that every time mythfilldatabase is run my mythfrontend loses connection with mythbackend. I have mythfilldatabase run at 6 every morning and then when I try to use mythtv nothing works. Simply closing mythfrontend and reopening it fixes the problem and everything works again.

Anyone else have this problem?
Back to top
View user's profile Send private message
mattfite
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Sun Dec 04, 2005 9:34 pm    Post subject: Reply with quote

Quote:
...but it seems that every time mythfilldatabase is run my mythfrontend loses connection with mythbackend. I have mythfilldatabase run at 6 every morning and then when I try to use mythtv nothing works. Simply closing mythfrontend and reopening it fixes the problem and everything works again.

I had this problem (I don't think I do any longer). Anyone feel free to correct me, but I "believe" that when I did an update to mysql 5.0.16-r2, that I had to re-emege mythtv. I can now run 'mythfilldatabase', run mythfrontend, exit, re-run mythfilldatabase and successfully connect mythfrontend to mythbackend.

i've been watching: https://bugs.gentoo.org/show_bug.cgi?id=113419 and https://bugs.gentoo.org/show_bug.cgi?id=114052 for guidance.
Back to top
View user's profile Send private message
oracleofmist
Apprentice
Apprentice


Joined: 19 Jun 2004
Posts: 235

PostPosted: Sun Jan 15, 2006 7:48 pm    Post subject: Reply with quote

i am also having the issue originally posted and followed the solution provided however still get the error

Code:

DB Error (Inserting into dd_schedule):
Query was:
INSERT INTO dd_schedule (programid,stationid,scheduletime,duration,`repeat`,stereo,subtitled,hdtv,closecaptioned,tvrating,partnumber,parttotal,endtime) VALUES('EP3169910098','10057','2006-01-16T15:00:00','01:00:00',:`REPEAT`,1,0,0,1,'TV-PG',0,0,'2006-01-16T16:00:00');
Driver error was [2/1064]:
QMYSQL3: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':`REPEAT`,1,0,0,1,'TV-PG',0,0,'2006-01-16T16:00:00')' at line 1

_________________
Segmentation Fault
Back to top
View user's profile Send private message
fserafin
Tux's lil' helper
Tux's lil' helper


Joined: 02 Oct 2005
Posts: 126
Location: Winnipeg, Canada

PostPosted: Sun Jan 15, 2006 11:28 pm    Post subject: Reply with quote

check out my post here might help you out. https://forums.gentoo.org/viewtopic-t-419085-highlight-.html
Back to top
View user's profile Send private message
MrMEEE
n00b
n00b


Joined: 08 Dec 2005
Posts: 57

PostPosted: Thu Sep 20, 2007 9:27 am    Post subject: Solved?? Reply with quote

I solved this problem.. I think..

I just installed as normal, and then afterwards:

# mysql -u root -p

# mysql> use mythconverg;
# mysql> flush tables;
# mysql> quit;

And everything worked
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