[mythtv-users] Restoring backup to a new backend
Paul Stillwell
bigboi at wackywombats.com
Wed Sep 23 23:41:24 UTC 2015
> On Sep 23, 2015, at 3:52 PM, John P Poet <jppoet at gmail.com> wrote:
>
> On Wed, Sep 23, 2015 at 1:58 PM Paul Stillwell <bigboi at wackywombats.com <mailto:bigboi at wackywombats.com>> wrote:
> Hi,
>
> I’m trying to build a new backend system. I backed up the database and then saved it on an external drive. I then installed a new hard drive and installed Fedora 22 and then installed mythtv from RPMFusion. I read this link https://www.mythtv.org/wiki/Backend_migration#Building_a_new_backend_to_replace_an_existing_machine <https://www.mythtv.org/wiki/Backend_migration#Building_a_new_backend_to_replace_an_existing_machine> which basically said all I need to do after installing myth is to restore the backup. I tried to restore the backup with mythconverg_restore.pl <http://mythconverg_restore.pl/> and I get an ‘Unable to connect to database’ error. Do I need to run the restore command with the —create_database option or should I do something else?
>
> Yes, you would need to create the DB. Also, if you have not done so, you need to get mysql daemon up and running -- set the password, etc. before the restore script will be able to write to the DB.
>
> For example:
> mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';
> mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv');
> mysql> grant all on mythconverg.* to 'mythtv'@'192.168.1.%' identified by 'mythtv';
> mysql> flush privileges;
>
> Also remember to run (at least for Fedora):
> $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root -p mysql
> to get the timezone configured correctly.
>
> John
>
John, thanks for the info! OK, just so I have the steps right, it would look like this:
1. Enable the mariaBD service
2. Start the mariaDB service
3. Create the initial database by doing this: mysql -u root < mc.sql
4. Do the SQL steps above by doing this:
> mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';
> mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv');
> mysql> grant all on mythconverg.* to ‘mythtv’@'192.168.1.%' identified by 'mythtv';
> mysql> flush privileges;
5. Run the mysql_tzinfo… to get the timezone info correct
6. Run mythconverg_restore.pl to restore the database
Do those sound like the right steps? Did I miss anything? When I googled for this info I get some slightly different steps from https://www.mythtv.org/wiki/User_Manual:Initial_Installation#MythTV_database_setup <https://www.mythtv.org/wiki/User_Manual:Initial_Installation#MythTV_database_setup> and from https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Red_Hat_Linux_and_Fedora <https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Red_Hat_Linux_and_Fedora>
I’m not sure which of those should be consulted when doing this. This is one of those processes that I do so infrequently that I have to look around each time I do it.
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150923/4a101a79/attachment.html>
More information about the mythtv-users
mailing list