<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 23, 2015 at 5:43 PM Paul Stillwell <<a href="mailto:bigboi@wackywombats.com">bigboi@wackywombats.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Sep 23, 2015, at 3:52 PM, John P Poet <<a href="mailto:jppoet@gmail.com" target="_blank">jppoet@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Sep 23, 2015 at 1:58 PM Paul Stillwell <<a href="mailto:bigboi@wackywombats.com" target="_blank">bigboi@wackywombats.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>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 <a href="https://www.mythtv.org/wiki/Backend_migration#Building_a_new_backend_to_replace_an_existing_machine" target="_blank">https://www.mythtv.org/wiki/Backend_migration#Building_a_new_backend_to_replace_an_existing_machine</a> which basically said all I need to do after installing myth is to restore the backup. I tried to restore the backup with <a href="http://mythconverg_restore.pl/" target="_blank">mythconverg_restore.pl</a> 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?</div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>For example:</div><div>mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div>mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv'); </div><div>mysql> grant all on mythconverg.* to 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div>mysql> flush privileges;</div><div><br></div><div>Also remember to run (at least for Fedora):</div><div>$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root -p mysql</div><div>to get the timezone configured correctly.</div><div><br></div><div>John</div><div><br></div></div></div></div></blockquote></div><div><br></div></div><div style="word-wrap:break-word">John, thanks for the info! OK, just so I have the steps right, it would look like this:<div><br></div><div>1. Enable the mariaBD service</div><div>2. Start the mariaDB service</div><div>3. Create the initial database by doing this: mysql -u root < mc.sql</div><div>4. Do the SQL steps above by doing this:</div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div>mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div>mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv'); </div><div>mysql> grant all on mythconverg.* to ‘mythtv’@'192.168.1.%' identified by 'mythtv';</div></div></div></blockquote><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div>mysql> flush privileges;</div></div></div></blockquote></div></div><div style="word-wrap:break-word"><div><div dir="ltr"><div class="gmail_quote"><div>5. Run the mysql_tzinfo… to get the timezone info correct</div><div>6. Run <a href="http://mythconverg_restore.pl" target="_blank">mythconverg_restore.pl</a> to restore the database</div><div><br></div><div>Do those sound like the right steps? Did I miss anything? When I googled for this info I get some slightly different steps from <a href="https://www.mythtv.org/wiki/User_Manual:Initial_Installation#MythTV_database_setup" target="_blank">https://www.mythtv.org/wiki/User_Manual:Initial_Installation#MythTV_database_setup</a> and from <a href="https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Red_Hat_Linux_and_Fedora" target="_blank">https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Red_Hat_Linux_and_Fedora</a></div><div>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.</div></div></div></div></div></blockquote><div><br></div><div>I *think* you can skip the `mysql -u root < mc.sql`, if you are passing --create_database option to <a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a>, but it has been a long time since I did this.  You can always play with it until you get it right.  If you need to start over, just pass both "--drop_database --create_database" to <a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a>.</div><div><br></div><div>John</div><div><br></div></div></div>