View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Sep 23, 2009 11:45 pm 
Offline
Joined: Wed Jan 10, 2007 10:59 am
Posts: 25
Hi all,

When running earlier R5 versions of knoppmyth, I liked to copy avi files from my windows computer to my myth box (the /myth/tv dir) and import them into the database using the myth.rebuilddatabase.pl script (I like to watch things in 1.3-1.5 speed sometimes using the builtin player - afaik, you don't have that option in mplayer if I were to copy them into the /myth/video dir instead). I recently did a fresh install of R6 and ran into a few snags.

1) The myth.rebuilddatabase.pl script was not in my PATH. I thought it was missing, but did find a reference to /usr/share/mythtv/contrib in the flyspray issues. I edited my /etc/profile to append it to the end of my PATH using:
Code:
  export PATH=$PATH:/usr/share/mythtv/contrib

I still consider myself to be a newbie when it comes to linux, so is this a good place to do this? Since it was a vanilla install, should the path have already been setup?

2) Once I could run the script, I tried the following from my /myth/tv:
Code:
 $ myth.rebuilddatabase.pl --try_default --ext avi

But, it immediately returns with:
Code:
 DBI connect('database=mythconverg:host=dragon','mythtv',...) failed: Can't connect to MySQL server on 'dragon' (111) at /usr/share/mythtv/contrib/myth.rebuilddatabase.pl line 191
  Cannot connect to database ()

The hostname of my system is dragon, so that seems right. Is the database still called mythconverg in R6? I also tried running as root and had the same problem.
Anyone have any thoughts on this? Thanks in advance.
-Chris


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 24, 2009 11:42 pm 
Offline
Joined: Wed Jan 10, 2007 10:59 am
Posts: 25
I dug around on the internet some and came across the DBI perl page. It had a simple example of using the DBI->connect call, so I modified my myth.rebuilddatabase.pl script to more closely match it. Basically, I removed the :host=$dbhost of the first parameter.
Old code:
Code:
my $dbh = DBI->connect("dbi:mysql:database=$database:host=$dbhost",
              "$user", "pass") or die "Cannot connect to database ($!)\n";

New code:
Code:
my $dbh = DBI->connect("dbi:mysql:database=$database",
              "$user", "pass") or die "Cannot connect to database ($!)\n";


Not sure what changed from my R5E50 install to this R6 install that is making the difference, but it now imports files and I can see them in my listings. Although I did try watching one mkv file and adjusting the playback speed to anything not 1.0 and it crashes the frontend - doh! Oh well - maybe I'll dig into that, maybe not.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 25, 2009 12:59 am 
Offline
Joined: Sun Sep 04, 2005 7:48 pm
Posts: 264
Location: Perth, Australia
A possible solution could be to use internal player for all media (recordings, video), and you should be able to 1.5 speed in both? I use internal for all, and its fine... I believe that there have been significant improvments in internal player since R5E50 days...is there still solid reasons for mplayer over internal for video?

_________________
LinHES: R6 | MB: Asus M3N-H/HDMI | CPU: AMD ??Mhz
Capture: 2xHDHR DVB-T
Graphics: Onboard 8300|PSU: Corsair vx450w
Cooling: Zalman cu?,
Display: Benq xx projector


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 25, 2009 8:53 am 
Offline
Joined: Wed Jan 10, 2007 10:59 am
Posts: 25
The mplayer (specifically an mplayer-wrapper script I think) is just the default for viewing videos in R6. I was able to dig around a little more and found there actually is a way to change the speed of playback within mplayer - one uses the square brackets [ , ] to make it go slower and faster. But just like the internal player, the frontend was crashing when I tried to change speed on an mkv file. It worked fine with an avi file I had though.
Just to double-check, to change over to it, do I just change the entry to be
Code:
Internal

to utilize the internal player instead?

I am still not sure why the myth.rebuilddatabase.pl script wasn't working out of the box. Anyone have any thoughts on that?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 25, 2009 10:21 am 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
Quote:
Just to double-check, to change over to it, do I just change the entry to be "Internal" to utilize the internal player instead?

Yes.
Quote:
I am still not sure why the myth.rebuilddatabase.pl script wasn't working out of the box. Anyone have any thoughts on that?

The error message sounds like a problem with the hostname, or connections to the hostname vs. localhost. What happens when you do:
Code:
$ mysql -u mythtv -h dragon -pmythtv

That should connect without error and give you a mysql prompt. If it doesn't work, maybe try localhost and see if that works? That would give you some indication of where the problem lies.

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 25, 2009 7:55 pm 
Offline
Joined: Wed Jan 10, 2007 10:59 am
Posts: 25
I tried your command out and using "-h dragon" results in "ERROR 2203 (HY000): Can't connect to MySQL server on 'dragon' (111)"

Next I tried with "-h localhost" and it popped right into the mysql prompt. This is wierd. When I run "hostname" from my command prompt, it is returning "dragon".


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 26, 2009 2:58 am 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
segamifo wrote:
I tried your command out and using "-h dragon" results in "ERROR 2203 (HY000): Can't connect to MySQL server on 'dragon' (111)"

Next I tried with "-h localhost" and it popped right into the mysql prompt. This is wierd. When I run "hostname" from my command prompt, it is returning "dragon".


Is there an entry for "dragon" as 127.0.0.1 in your /etc/hosts file? (No is the answer). This is expected behaviour.

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 26, 2009 10:39 pm 
Offline
Joined: Wed Jan 10, 2007 10:59 am
Posts: 25
Actually, there is an entry, but perhaps the dragon and localhost are out of order?
Code:
[segami_fo@dragon etc]$ cat hosts
127.0.0.1 dragon localhost
# /etc/hosts: static lookup table for host names
#<ip-address>  <hostname.domain.org>  <hostname>
# End of file


Should those be the opposite way around?

EDIT: In looking around the net some, it looks like that is the correct ordering. I did also run a "domainname" and it comes back with "(none)". Would that be affecting the hosts file/sql login somehow?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 27, 2009 12:01 am 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
The question I should have asked is why do you have to connect to the host name "dragon" from the localhost?

If you have a look at your database "mysql" in the "user" table, you'll see that there's an entry like this:
Code:
| localhost | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N 


If you change "localhost" to "%" and enable networking in your my.cnf you'll be able to connect as mysql from anywhere. You can do the db change in a one-liner like this:
Code:
echo 'update user set Host="%" where Host="localhost" and User="mysql"'|mysql -u root mysql


Make this change only and you should be able to connect to host "dragon" locally. Enabling networking means you'll be able to connect from anywhere. The latter isn't recommended, since it's asking for someone to hack the box (assuming it's exposed to the Internet).

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 19, 2010 9:17 pm 
Offline
Joined: Mon Aug 14, 2006 8:24 pm
Posts: 320
Location: Melbourne, Australia
I recently had to rebuild the database after an incident. I too had to modify the myth.rebuildatabase.pl script to remove the "host=$dbhost" reference as described above in order to make it work. Thanks for the info segamifo.

EDIT: I also needed to eliminate a time/format error by this method

_________________
Intel DG965WH, Dvico DVB-T Lite x2, HDHR, Gigabyte GT220, KingstonSSD, WD20EARS version=latest


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: Google [Bot] and 16 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu