View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 29 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Mon Apr 20, 2009 7:41 pm 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
Ok here is what I got:

Code:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| mythconverg        |
+--------------------+
3 rows in set (0.04 sec)


Code:
mysql> USE mysql


Code:
mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
17 rows in set (0.00 sec)



Code:
mysql> describe user;
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Field                 | Type                              | Null | Key | Default | Extra |
+-----------------------+-----------------------------------+------+-----+---------+-------+
| Host                  | char(60)                          | NO   | PRI |         |       |
| User                  | char(16)                          | NO   | PRI |         |       |
| Password              | char(41)                          | NO   |     |         |       |
| Select_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Insert_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Update_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Delete_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Create_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Drop_priv             | enum('N','Y')                     | NO   |     | N       |       |
| Reload_priv           | enum('N','Y')                     | NO   |     | N       |       |
| Shutdown_priv         | enum('N','Y')                     | NO   |     | N       |       |
| Process_priv          | enum('N','Y')                     | NO   |     | N       |       |
| File_priv             | enum('N','Y')                     | NO   |     | N       |       |
| Grant_priv            | enum('N','Y')                     | NO   |     | N       |       |
| References_priv       | enum('N','Y')                     | NO   |     | N       |       |
| Index_priv            | enum('N','Y')                     | NO   |     | N       |       |
| Alter_priv            | enum('N','Y')                     | NO   |     | N       |       |
| Show_db_priv          | enum('N','Y')                     | NO   |     | N       |       |
| Super_priv            | enum('N','Y')                     | NO   |     | N       |       |
| Create_tmp_table_priv | enum('N','Y')                     | NO   |     | N       |       |
| Lock_tables_priv      | enum('N','Y')                     | NO   |     | N       |       |
| Execute_priv          | enum('N','Y')                     | NO   |     | N       |       |
| Repl_slave_priv       | enum('N','Y')                     | NO   |     | N       |       |
| Repl_client_priv      | enum('N','Y')                     | NO   |     | N       |       |
| Create_view_priv      | enum('N','Y')                     | NO   |     | N       |       |
| Show_view_priv        | enum('N','Y')                     | NO   |     | N       |       |
| Create_routine_priv   | enum('N','Y')                     | NO   |     | N       |       |
| Alter_routine_priv    | enum('N','Y')                     | NO   |     | N       |       |
| Create_user_priv      | enum('N','Y')                     | NO   |     | N       |       |
| ssl_type              | enum('','ANY','X509','SPECIFIED') | NO   |     |         |       |
| ssl_cipher            | blob                              | NO   |     |         |       |
| x509_issuer           | blob                              | NO   |     |         |       |
| x509_subject          | blob                              | NO   |     |         |       |
| max_questions         | int(11) unsigned                  | NO   |     | 0       |       |
| max_updates           | int(11) unsigned                  | NO   |     | 0       |       |
| max_connections       | int(11) unsigned                  | NO   |     | 0       |       |
| max_user_connections  | int(11) unsigned                  | NO   |     | 0       |       |
+-----------------------+-----------------------------------+------+-----+---------+-------+
37 rows in set (0.00 sec)


So what does this all mean??

On another note, my User Jobs are not running anymore either... :(

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 20, 2009 9:39 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
pmljr - use the command line scanman717 gives which skips grants.

scanman717 - do a "select * from mysql.user" and verify that you have 4 rows there as described.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 7:53 am 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
tjc, when I do the command you posted I just go to a:

->

Prompt.

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 7:18 pm 
Offline
Joined: Wed Mar 04, 2009 2:56 pm
Posts: 23
Location: Trumbull, CT
I ran
Code:
mysqld_safe --skip-grant-tables &

and got the following output:
[1] 26766
root@pisces:~# Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[26803]: started
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[26812]: ended

[1]+ Done mysqld_safe --skip-grant-tables


Then I try to start the backend like this
Code:
/etc/init.d/mythtv-backend start

and get this output:
Starting MythTV server: mythbackend/usr/bin/mythbackend: symbol lookup error: /usr/lib/libmythlivemedia-0.21.so.0: undefined symbol: _ZN20H263plusVideoRTPSi~kD0Ev

Whenever I try to use mysql such as
Code:
mysql>show tables
I get this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

What log can I look in to see what the heck is happening?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 9:28 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
scanman717 wrote:
tjc, when I do the command you posted I just go to a:

->

Prompt.


That sounds like the smoking gun! I don't know what else got roached but at the very least you lost your user table. You may be able recover by making a mythconverg backup, reinstalling mysql from the debian package, rerunning the mythtv DB setup script, and finally restoring mythconverg from the backup.

Honestly unless you have a lot of customizations it might be simpler to do a backup and auto-upgrade back to the same version. With a bit of planning It only takes about 30 minutes.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 21, 2009 9:32 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
pmljr wrote:
Then I try to start the backend like this
Code:
/etc/init.d/mythtv-backend start

and get this output:
Starting MythTV server: mythbackend/usr/bin/mythbackend: symbol lookup error: /usr/lib/libmythlivemedia-0.21.so.0: undefined symbol: _ZN20H263plusVideoRTPSi~kD0Ev

Whenever I try to use mysql such as
Code:
mysql>show tables
I get this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

It sounds like you may have a generalized disk corruption problem. If you can't make a db backup you may be out of luck. You definitely are going to want to go the backup and auto-upgrade path, but try verifying the drive first. It may be baked.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 6:43 am 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
tjc wrote:
scanman717 wrote:
tjc, when I do the command you posted I just go to a:

->

Prompt.


That sounds like the smoking gun! I don't know what else got roached but at the very least you lost your user table. You may be able recover by making a mythconverg backup, reinstalling mysql from the debian package, rerunning the mythtv DB setup script, and finally restoring mythconverg from the backup.

Honestly unless you have a lot of customizations it might be simpler to do a backup and auto-upgrade back to the same version. With a bit of planning It only takes about 30 minutes.


Can I recreate this table?? Sounds like it might be a simple table.. Unfortunately I do have a lot of customizations on this box... If I go to the trouble of the restore, I'm gonna go to a bigger disk and newer version...

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 11:57 am 
Offline
Joined: Wed Mar 04, 2009 2:56 pm
Posts: 23
Location: Trumbull, CT
tjc wrote:
It sounds like you may have a generalized disk corruption problem. If you can't make a db backup you may be out of luck. You definitely are going to want to go the backup and auto-upgrade path, but try verifying the drive first. It may be baked.

Its funny because most of the functionality is still there: I can SSH into the box, I can watch tv (from another PC on the network using a media player), and I can run other daemons, but the frontend (and I guess the backend) and MySQL won't start.

Anyway, I am new to Linux, doing the total immersion thing by building an Ubuntu server in the basement and Knoppmyth box upstairs at the same time, but I have only about 2 months of Linux under my belt and reading books as fast as I can. So I need just a little more help.

I can figure out how to verify the drive on my own, but how do I do the auto-upgrade thing?

And thanks for the time...


Top
 Profile  
 
PostPosted: Wed Apr 22, 2009 5:27 pm 
Offline
Joined: Wed Mar 04, 2009 2:56 pm
Posts: 23
Location: Trumbull, CT
OK, I should have researched this first before I asked. I see how to do both backup and auto-upgrade. For anyone else reading this, the backup procedure can be found here
http://www.knoppmythwiki.org/index.php?page=MythBackupAndRestoreHowTo

and the upgrade info here
http://www.knoppmythwiki.org/index.php?page=UpgradeHowTo

Thanks for the help and I will post my results shortly


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 22, 2009 8:59 pm 
Offline
Joined: Wed Mar 04, 2009 2:56 pm
Posts: 23
Location: Trumbull, CT
Performed backup using mythbackup. Got some complaints about DB problems. No surprise.

Performed auto-upgrade. Things looking good. Reboot after auto-upgrade...and bingo, fsck hangs at 5.5%. Reboot again, fsck hangs at 4.6%. Repeat auto-upgrade again, now reboot, fsck hangs at 5.6%. But no error messages. It looks hung and I reboot within a few minutes of no disk drive activity. Should I wait longer?

I did not verify the drive beforehand, but I'm wondering why fsck doesn't simply find the errors instead of hanging.


Top
 Profile  
 
 Post subject: pmljr problem solved
PostPosted: Thu Apr 23, 2009 8:10 pm 
Offline
Joined: Wed Mar 04, 2009 2:56 pm
Posts: 23
Location: Trumbull, CT
I finally checked the disk drive by booting to a Gparted Live CD and could find no bad blocks. In the end there appeared to be a file or broken config issue on /myth that was being reinstalled during auto-upgrade (auto-upgrade retores settings from backup).

I reinstalled Knoppmyth using auto-install and it is back up and running perfectly.

Thanks again for everyone's help. I really appreciate the time.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 10:44 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
pmljr wrote:
I can figure out how to verify the drive on my own, but how do I do the auto-upgrade thing?.

The R5.5 Hints linked from my signature contain very detailed and current directions. In general, the Hints corresponding to a given release tend to be a better choice than the wiki procedures which may be out of date.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 30, 2010 5:17 am 
Offline
Joined: Tue Jan 23, 2007 1:38 pm
Posts: 249
Location: Sweden
scanman717 wrote:
tjc wrote:
scanman717 wrote:
tjc, when I do the command you posted I just go to a:

->

Prompt.


That sounds like the smoking gun! I don't know what else got roached but at the very least you lost your user table. You may be able recover by making a mythconverg backup, reinstalling mysql from the debian package, rerunning the mythtv DB setup script, and finally restoring mythconverg from the backup.

Honestly unless you have a lot of customizations it might be simpler to do a backup and auto-upgrade back to the same version. With a bit of planning It only takes about 30 minutes.


Can I recreate this table?? Sounds like it might be a simple table.. Unfortunately I do have a lot of customizations on this box... If I go to the trouble of the restore, I'm gonna go to a bigger disk and newer version...


I just had the exact same issue as Scanman. In my case I lost contact with the backend last night. Don't remember how I came to that conclusion, but I ended up checking the database and it was chock full of errors. Repaired it seemingly OK and fired up. Still no go. The disk was full. The mythbackend.log was enormous. I just deleted it without checking its contents, since I figured it would just be full of db connect errors. Still no go and I realized I was in Scanman's situation. Don't know what caused it. No power surges or anything I could connect with this happening.

Luckily, I have this script which I copied from one of you precious fellows on this forum. I wish I could remember who! It dumps the mysql database nightly and has saved my day (and a few other precious things on my body) before:
Code:
root@Fido:/etc/cron.daily# cat backupmysql.sh
#!/bin/sh
#Dumps the mythconverg database - daily backup
#Keeps the last 7 days
DAY=($(/bin/date +%u))
DUMPFILE="mythbe_$DAY.sql"
nice -n 19 /usr/bin/mysqldump -u mythtv -pmythtv mythconverg -c > /myth/backup/$DUMPFILE
cp /myth/backup/$DUMPFILE /mnt/NAPOLEON/backup/Ludde
exit 0

It also copies the dumpfile to another system in another place. You just can't be too careful, can you? Just in case mr Fumblebutt (yours truly...) would accidentally edit a partition table or something. This script has the advantage of executing fron crontab whether I remember to backup or not:
Code:
57 4 * * *   root   /etc/cron.daily/backupmysql.sh >>/var/log/mythtv/backupmysql.log 2>&1


Incidentally, although the system sat inoperable during the rest of the night, the dump script executed and I now have these files in the backup directory:
    root@Fido:/myth/backup# ls -l
    total 283460
    -rw-r--r-- 1 root root 307 Jan 1 13:46 backup.list
    -rw-r--r-- 1 root root 977 Jan 31 2008 crontab
    drwxr-xr-x 4 root root 4096 Oct 26 2008 etc
    drwxr-xr-x 2 root root 4096 Apr 26 2008 gammalt
    -rw-r--r-- 1 root root 759 Jan 25 04:57 mythbe_1.sql
    -rw-r--r-- 1 root root 759 Jan 26 04:57 mythbe_2.sql
    -rw-r--r-- 1 root root 759 Jan 27 04:57 mythbe_3.sql
    -rw-r--r-- 1 root root 759 Jan 28 04:57 mythbe_4.sql
    -rw-r--r-- 1 root root 759 Jan 29 04:57 mythbe_5.sql
    -rw-r--r-- 1 root root 240469147 Jan 30 04:57 mythbe_6.sql
    -rw-r--r-- 1 root root 759 Jan 24 04:57 mythbe_7.sql
    -rw-r--r-- 1 root root 759 Jan 30 11:15 mythconverg.sql
    -rw-r--r-- 1 root root 307 Oct 26 2008 restore.list
    drwxr-xr-x 3 root root 4096 Oct 26 2008 root
    -rw------- 1 root root 49431213 Jan 8 13:18 savedfiles.tar.gz
    -rw-r--r-- 1 root root 582 Aug 28 2006 sysstat
    -rwxr-xr-x 1 root root 469 Aug 28 2006 sysstatdaily
Note that the one run at 4:57 this morning suddenly is humongous. My cure for the situation was to copy the previous backup to mythconverg.sql:
Code:
cp mythbe_5.sql mythconverg.sql

and run:
Code:
mysql -f -u mythtv -pmythtv mythconverg < mythconverg.sql

Now all I have to do is to salvage all the recordings made in the past 30 hours or so. I know the instructions are here somewhere. :D

Cheers,
/Chris

_________________
LinHES R8.6.1
BE: AMD64X4, 4GB, Hauppauge usb tuners
FE1: Gigabyte F2A85X-UP4, nVidia GT640
FE2: Gigabyte GA-MA69GM-S2H, AthlonX2 4850E 2.5 GHz, 1GB, ASUS GEFORCE 7200GS 256MB
FE3: Asus Eeebox410


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 30, 2010 5:51 am 
Offline
Joined: Tue Jan 23, 2007 1:38 pm
Posts: 249
Location: Sweden
Ah, here it is:
Quote:
myth.rebuilddatabase.pl

Wow - was that cool! It even matches the recording times with the guide data to create a fully valid recording! It found me a couple of old lost recordings as well.

Thanks!
/Chris

_________________
LinHES R8.6.1
BE: AMD64X4, 4GB, Hauppauge usb tuners
FE1: Gigabyte F2A85X-UP4, nVidia GT640
FE2: Gigabyte GA-MA69GM-S2H, AthlonX2 4850E 2.5 GHz, 1GB, ASUS GEFORCE 7200GS 256MB
FE3: Asus Eeebox410


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 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