Mailing List Archive

Re: Database corruption - I think
Roland and Steve:


I apologize for the delay in responding – semi-minor family issue (OK now).


Steve: The Backend’s IP address is fine (set for static) and a remote
Frontend is able to connect plus play the recordings. Thanks for that
reminder.


Roland: Appears sufficient free space: 21% used; various tmpfs show 0
and 1% used.


You may need a lot of free space on the /tmp folder.

If I’m reading the table correctly I should have almost a TB available.



Note, the needed password is stored in the 'config.xml' file
mysql -u mythtv -p<your-password> mythconverg


I’m assuming there should be a space after the ‘-p’. I did and output
was a help display followed by a table of variables. Lots of ‘(No
default value)’ listed.



MariaDB [mythconverg]>check table program;
MariaDB [mythconverg]>repair table program;


Here things don’t go quite right. Here it wanted ‘mariadb’ –
lower-cased. No biggie.


Both commands went straight/immediately to the command line. ….Ah! It
created files called ‘check’ and ‘repair’, both of which contain the
help and variables I saw above. Makes sense with the ‘>’ redirect
thingie. Assume the ‘check table program’ is a switch option. Will post
this and do a little Googling in the meantime.


Thanks for the help, gentlemen!

Barry


P.S.: Where is the correct website to post? I’m replying via my e-mail’s
“Rely List” and in the past have been told it creates a new thread. I
looked in https://forum.mythtv.org <https://forum.mythtv.org/> but was
unable to find this thread – found some earlier ones. I can find me and
this thread at

http://lists.mythtv.org/pipermail/mythtv-users/

https://lists.mythtv.org/pipermail/mythtv-users/2022-January/408623.html

but can’t figure out how to reply.
Re: Database corruption - I think [ In reply to ]
OK, I couldn’t figure out how to get Roland’s mariadb check/repair table
to work; also went to https://mariadb.com/kb/en/check-table/
<https://mariadb.com/kb/en/check-table/> and
https://mariadb.com/kb/en/repair-table/
<https://mariadb.com/kb/en/repair-table/> .


What I did figure out and seems to be working (yea!!) is this (from my
notes):


https://www.mythtv.org/wiki/Database_Backup_and_Restore
<https://www.mythtv.org/wiki/Database_Backup_and_Restore>

*1. Need to empty the current corrupted database:*

https://www.mythtv.org/wiki/Database_Setup#Setting_up_the_initial_database
<https://www.mythtv.org/wiki/Database_Setup#Setting_up_the_initial_database>

$ mysql -uroot -p < mc.sql note: mc.sql is located in
/usr/share/mythtv/sql

==> cd to subdir

command NF mc.sql ==> find: /usr/share/mythtv/sql/mc.sql


*cd /usr/share/mysql*

*sudo mysql -uroot -p < /usr/share/mythtv/sql/mc.sql*


Asks for my password

Asks for mythtv password (BE3 = ZXXXXXXX)



*2. Restore a backed up database:*


*/usr/share/mythtv/mythconverg_restore.pl --drop_database
--create_database --directory /home/barry/Mythtv/db_backups --filename
mythconverg-1350-20220104002.sql.gz *


/--directory = full path to where the backup file is/

/--filename = backed-up database file/


Sits for around a minute – “Successfully restored backup”!!


mythfilldatabase ==> works!! :)



(Hopefully this formats correctly: earlier while looking for how to
upload via the website I found supposed to upload as plain text – that
also explains the deleted HTML message at the bottom of some messages.
This was uploaded via e-mail until figure out the website stuff.)


Barry





_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Database corruption - I think [ In reply to ]
On 07/01/2022 17:16, Barry Martin wrote:
>
>
> Roland and Steve:
>
>
> I apologize for the delay in responding – semi-minor family issue (OK now).
>
>
> Steve: The Backend’s IP address is fine (set for static) and a remote Frontend is able to connect
> plus play the recordings. Thanks for that reminder.
>
>
> Roland: Appears sufficient free space: 21% used; various tmpfs show 0 and 1% used.
>
>
> You may need a lot of free space on the /tmp folder.
>
> If I’m reading the table correctly I should have almost a TB available.
>
>
>
> Note, the needed password is stored in the 'config.xml' file
> mysql -u mythtv -p<your-password> mythconverg
>
>
> I’m assuming there should be a space after the ‘-p’. I did and output was a help display followed by
> a table of variables. Lots of ‘(No default value)’ listed.
>
>
>
> MariaDB [mythconverg]>check table program;
> MariaDB [mythconverg]>repair table program;
>
>
> Here things don’t go quite right. Here it wanted ‘mariadb’ – lower-cased. No biggie.
>
>
> Both commands went straight/immediately to the command line. ….Ah! It created files called ‘check’
> and ‘repair’, both of which contain the help and variables I saw above. Makes sense with the ‘>’
> redirect thingie. Assume the ‘check table program’ is a switch option. Will post this and do a
> little Googling in the meantime.
>
Nope. The 'mysql' command above gets you into command line mode *within* the appropriate program. If
you have mysql, that's mysql (obvs). If you have mariadb, mysql is an alias for it.

The next two lines shown below that command are the *program prompts* from within the db!

All you should need to do is type those two commands after the > prompt:

check table program;
repair table program;

(then 'exit' to exit)

Note that all mysql/mariadb commands should be terminated by a semi-colon. If you don't do that it
will sit and wait until it sees one.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Database corruption - I think [ In reply to ]
Hi Mike!


Thanks for the explanation – half-recognized the need for the
semi-colons from other projects.


>> mysql -u mythtv -p<your-password> mythconverg
> Nope. The 'mysql' command above gets you into command line mode *within* the appropriate program. If
> you have mysql, that's mysql (obvs). If you have mariadb, mysql is an alias for it.
>
> The next two lines shown below that command are the*program prompts* from within the db!
>
> All you should need to do is type those two commands after the > prompt:
>
> check table program;
> repair table program;
>
> (then 'exit' to exit)


Was going to whine it still doesn’t work even after the Backend works
again but figured it out: with a space between ‘-p’ and the password I
get the help screen followed by the Variables Table and back to Terminal
prompt. Without a space it does go to the program prompt.


Did do the ‘check table program;’ and responded OK.


So looks like “BE3” is back to up and running – until whatever caused
the crash fails again. On to “BE4”! Thanks for the tip!


Barry






_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org