[mythtv-users] Fixing minor errors in Myth database

Paul Gardiner lists at glidos.net
Sun Apr 28 13:16:55 UTC 2013


On 28/04/2013 00:50, Fred Hamilton wrote:
> Thanks Mike.  You wrote:
>  > To fix corruption, the only supported solution is to throw away
>  > all re-creatable data (settings/configuration/plugin data/...)
>  > and keep only the essential non-re-creatable data (recording
>  > information and history).  You do so with a partial restore
>  >
>  >
> http://www.mythtv.org/wiki/Database_Backup_and_Restore#Partial_restore_of_a_backup
>
> OK.  Here are the steps I've taken:
> mythconverg_backup.pl <http://mythconverg_backup.pl> --verbose
> That seemed to work fine.
>
> The next step in the wiki is to delete the existing database:
>      mysql -uroot -p -e 'DROP DATABASE IF EXISTS mythconverg;'
> That also seemed to work (no error messages anyway)
>
> Then the wiki says "then create a new database (and note that doing so
> may change MySQL passwords/permissions, so may cause authentication
> problems).", pointing to
> http://www.mythtv.org/wiki/MythTV-HOWTO#Setting_up_the_initial_database
> which seems to say to:
>      $ cd database
>      $ mysql < mc.sql
>
> So I got stuck with these three questions:
> 1. Where is this database directory I'm supposed to cd to?
> 2. where can I find mc.sql?  Is it the 320 byte file already on my
> system at /usr/share/mythtv/sql/mc.sql
> 3. This step has the ominous but not particularly helpful warning that
> "doing so may change MySQL passwords/permissions, so may cause
> authentication problems".  Can I prevent that by using my old MySQL
> password or something?

I've recently performed a partial restore. Here's the sequence you need
(assuming I'm remembering it correctly).

First start up mysql as root:

   mysql -u root -p

Then type at the mysql prompt:

   DROP DATABASE mythconverg;
   CREATE DATABASE mythconverg;
   GRANT ALL ON mythconverg.* TO mythtv@"%" IDENTIFIED BY mythtv;
   FLUSH PRIVILEGES;
   QUIT;

You don't need mc.sql. Just run mythtvsetup and it will create
all the tables.

Cheers,
	Paul.


More information about the mythtv-users mailing list