Author Topic: MythTV - Odd database issues, and mysql failures!!!Help!!  (Read 3777 times)

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
MythTV - Odd database issues, and mysql failures!!!Help!!
« on: September 16, 2008, 01:37:15 pm »
 :o
So, last evening I get home from work and get ready to fire up some of the recording I myth'd over the weekend. I fire up the LMCE video menu, and instead of seeing my tv shows there with cover art, I get the evil 2135_2008091401000.mpg files. So, I jump into MythTV and fire up the recordings menu, and of course, all my shows are there. So I go back out, and fire up mythweb to see if there is anything missing there. It says the tuner card on my Media Director in the Basement, is "(Currently not connected)". So I figure it is hung, I go downstairs, and its running fine, so I fire up MythTV there, and I get the mythtv-setup screen asking me about language preferences. I choose English, insure the server information is correct, and still no MythTV.

So I go back upstairs and fire up my laptop, and get two ssh sessions going, one to the core and the other to the MD in the basement. I become root on the core, and run the various job scripts I have, and they seem to complete successfully. So, I jump into the ssh session to the MD, and type 'mysql -u mythtv -p mythconverg, enter the password, and get a "Unable to connect to mysql socket at /var/run/mysql/mysql.sock2, or something like that. So the next thing I try, is typing in 'mysql -u mythtv -p mythconverg -h dcerouter' That worked and I connected to the database on the core.

So then I start digging into the various jobs I have scripted, like my mythpretty script which makes Human Readable entries from the evil mythtv numbering schema as detailed in my wiki entry here http://wiki.linuxmce.org/index.php/MythPretty and I notice that the shows are no longer being updated. For instance I know I have 2 episodes of The Shield recorded, but only one shows up.

So I run the script on the MD, and it also does no updates, and from either LMCE, MythTV, or the XboxMC I have running, I can not watch any of the shows recorded by the MD. MythTV recordings menu for instance says "File not found" I can only speculate that this is because the MD can not connect to the mysql database, via MythTV.

Most of the googling I did says about settings for the /etc/mysql/my.cnf file needing to be changed. Specifically the "bind address" portion of it. However, I have never changed this file. The only recent changes I did was re-installing the mythtv database, to resolve a tuner card not showing up issue, and restoring my mythconverg tables relating to previously recorded, and still used MythTV recordings, which I wiki'd here:
http://wiki.linuxmce.org/index.php/Mythtv:RestoreRecordingsAfterUpgrade

I am at a loss. I am preparing to nuke and pave the core and start again, but I was wondering if any of you guru-types, may have a place for me to look, as to repairing my database issues.

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: MythTV - Odd database issues, and mysql failures!!!Help!!
« Reply #1 on: September 16, 2008, 01:51:08 pm »
Most of the googling I did says about settings for the /etc/mysql/my.cnf file needing to be changed. Specifically the "bind address" portion of it. However, I have never changed this file. The only recent changes I did was re-installing the mythtv database, to resolve a tuner card not showing up issue, and restoring my mythconverg tables relating to previously recorded, and still used MythTV recordings, which I wiki'd here:
http://wiki.linuxmce.org/index.php/Mythtv:RestoreRecordingsAfterUpgrade

I am at a loss. I am preparing to nuke and pave the core and start again, but I was wondering if any of you guru-types, may have a place for me to look, as to repairing my database issues.

 I wonder if this is part of it?

Code: [Select]
Modifying access to the MySQL database for multiple systems

If you're going to have multiple systems accessing a master database, you must grant access to the database from remote systems. By default, the mc.sql script is only granting access to the local host.

To allow other hosts access to your master database, you can either set it up for no security at all, or with more granularity. Note that the "%" is the wildcard character in MySQL.

NOTE: The "no security" option is very dangerous unless you're in a controlled environment. This example has no security at all, and allows access from any host.

    $ mysql -u root mythconverg
    mysql> grant all on mythconverg.* to mythtv@"%" identified by "mythtv";
    mysql> flush privileges;

For a more secure setup, you can restrict which machines or subnets have access. If you have a complete DNS system operational, you could do the following:

    $ mysql -u root mythconverg
    mysql> grant all on mythconverg.* to mythtv@"%.mydomain.com" identified by "mythtv";
    mysql> flush privileges;

Finally, if you just want to restrict by IP subnet (in this example, the 192.168.1. network):

    $ mysql -u root mythconverg
    mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by "mythtv";
    mysql> flush privileges;

You'll also need to check that the "networking" feature of MySQL is turned on. Check that /etc/mysql/my.cnf does not contain skip-networking. If it does, remove it. Also verify that bind-address is set to your IP address instead of 127.0.0.1. If you change either of these items, restart MySQL.

NOTE: Your distribution may have a customized MySQL configuration file; in Mandriva, check /etc/sysconfig/mysqld for additional configuration.

 Info found here:  http://www.mythtv.org/docs/mythtv-HOWTO-6.html

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: MythTV - Odd database issues, and mysql failures!!!Help!!
« Reply #2 on: September 16, 2008, 02:01:31 pm »
 :D
Hey, thanks for the quick reply. I looked at this last evening, but made no real changes, for fear of hosing things up even more. I thought about running the command to "grant all" and in fact, my mythtv database was rebuilt by using the mc.sql file stored in /usr/share/mythtv/contrib/sql on the core. So in fact this may be a part of the problem. More interesting though is that I can connect to the mysql db form the MD when using the -h (hostname) switch. This is the part that stumped me. I deleted and rebuilt the MD last evening before bed, figuring that a fresh install would correct any issues that may have happened on the MD, but I left the core alone.

This is a good place to look. I also re-installed the /etc/mysql/my.cnf file from the /recovery partition on the core, in case something there got hosed. However, I did not run any commands on the database side.

Perhaps I can loook into this this evening when I get home. I really want to not have to re-install. But sometimes this proves to be easier, but then nothing is learned.

Thanks Again,

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: MythTV - Odd database issues, and mysql failures!!!Help!!
« Reply #3 on: September 17, 2008, 07:00:00 pm »
 :(
OK, Last evening I re-installed and relocated my core to the basement. Everything is working now. I am going to get a dump of the mythconverg db and attempt at restoring my old recordings.

I will follow the wiki entry (test time) and see if that gets the results I want.

I will post my findings.

Regards,

Seth

p.s. When trying to get something done in a timely manner, don't sit on your laptop and watch "8 out of 10 cats" on youtube.  :P
Had to break away to finish the install.  ;D
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: MythTV - Odd database issues, and mysql failures!!!Help!!
« Reply #4 on: September 18, 2008, 01:50:51 pm »
 :o
Ok. So last evening I exported my fresh new mythconverg database, loaded my hosed database into a new db called old_mythtv, and clicked the tables necessary to bring back my recordings into the mythtv menu. And of course it worked. I have noticed some oddities though.

I have 3 User Jobs that I run after each show. The first job everyone runs, Save show to pluto db, the 2nd job I run is the remove-commercials script. Now this appears to not be running correctly. When I run the job from the command line, when it tries to update the database after the commflagging portion it fails complaining about invalid table entries. The only one that is working correctly is job 3, mythpretty, this saves off my shows to a different directory, in folders for the series, and then episodes under it.

The pluto db job is not working as I end up with the 104320080917200000.mpg file instead of Bones and the cover art of the series. SO the pluto db job is not running, and the remove-commercials job is not completing.

So I ask the group, what logs do I need to look at and does anyone have any mysql tricks to peruse the databases and look for a "diff" from the original to the newly modified one?

The core itself, now that it is not launching the "Media Station" has been rock solid. No lockups, and occasionally there is a hiccup while watching live tv, that the images stops, then starts again. This is random, and does not happen at any one particular time, and it only lasts a brief second or 2.

The new core is in the basement, it has the tuner cards, and all the storage. The dish network receivers are next to the MD in the living room, and are controlled by its USB-UIRT. I have 24' a/v cables going down into the basement to the cores tuner cards. Apparently preventingthe Orbiter from loading, by taking the check out of the box next to auto start media station, has made my core extremely stable. Going back to pluto's way of thinking that the core should be out of the way somewhere.

So I ask the powers that be to help me if they can to figure out how to get my database straightened out, and why the Save to pluto db job is not working.

What logs do I look into, or is there a verbose switch I can run on it and watch the output?

Thanks in advance,

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: MythTV - Odd database issues, and mysql failures!!!Help!!
« Reply #5 on: September 18, 2008, 04:42:45 pm »
...
So I ask the group, what logs do I need to look at and does anyone have any mysql tricks to peruse the databases and look for a "diff" from the original to the newly modified one?
...

Dunno about the logs, but you can easily "diff" mysqldumps, if you make them with the "--skip-extended-insert" option.
"Change is inevitable. Progress is optional."
-- Anonymous