<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2015, at 5:16 PM, John P Poet <<a href="mailto:jppoet@gmail.com" class="">jppoet@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Sep 23, 2015 at 5:43 PM Paul Stillwell <<a href="mailto:bigboi@wackywombats.com" class="">bigboi@wackywombats.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Sep 23, 2015, at 3:52 PM, John P Poet <<a href="mailto:jppoet@gmail.com" target="_blank" class="">jppoet@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Sep 23, 2015 at 1:58 PM Paul Stillwell <<a href="mailto:bigboi@wackywombats.com" target="_blank" class="">bigboi@wackywombats.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hi,<div class=""><br class=""></div><div class="">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" class="">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<span class="Apple-converted-space"> </span><a href="http://mythconverg_restore.pl/" target="_blank" class="">mythconverg_restore.pl</a><span class="Apple-converted-space"> </span>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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">For example:</div><div class="">mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div class="">mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv'); </div><div class="">mysql> grant all on mythconverg.* to 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div class="">mysql> flush privileges;</div><div class=""><br class=""></div><div class="">Also remember to run (at least for Fedora):</div><div class="">$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --user=root -p mysql</div><div class="">to get the timezone configured correctly.</div><div class=""><br class=""></div><div class="">John</div><div class=""><br class=""></div></div></div></div></blockquote></div><div class=""><br class=""></div></div><div style="word-wrap: break-word;" class="">John, thanks for the info! OK, just so I have the steps right, it would look like this:<div class=""><br class=""></div><div class="">1. Enable the mariaBD service</div><div class="">2. Start the mariaDB service</div><div class="">3. Create the initial database by doing this: mysql -u root < mc.sql</div><div class="">4. Do the SQL steps above by doing this:</div></div><div style="word-wrap: break-word;" class=""><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">mysql> create user 'mythtv'@'192.168.1.%' identified by 'mythtv';</div><div class="">mysql> set password for 'mythtv'@'192.168.1.%' = password('mythtv'); </div><div class="">mysql> grant all on mythconverg.* to ‘mythtv’@'192.168.1.%' identified by 'mythtv';</div></div></div></blockquote><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">mysql> flush privileges;</div></div></div></blockquote></div></div><div style="word-wrap: break-word;" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">5. Run the mysql_tzinfo… to get the timezone info correct</div><div class="">6. Run<span class="Apple-converted-space"> </span><a href="http://mythconverg_restore.pl/" target="_blank" class="">mythconverg_restore.pl</a><span class="Apple-converted-space"> </span>to restore the database</div><div class=""><br class=""></div><div class="">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" class="">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" class="">https://www.mythtv.org/wiki/MythTV-HOWTO_-_0.27#Red_Hat_Linux_and_Fedora</a></div><div class="">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 class=""><br class=""></div><div class="">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/" class="">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/" class="">mythconverg_restore.pl</a>.</div><div class=""><br class=""></div><div class="">John</div><div class=""><br class=""></div></div></div></div></blockquote></div><br class=""><div class=""><div class="">I looked at the myth converge_restore.pl script and it looks like if you pass it —drop_database and —create_database then it will do the same thing as ‘mysql -u root < mc.sql’. I’m assuming that it will then restore the database based on the file passed in or the place where it is pointed to by the backuprc file. If the database is restored after —drop_database and —create_database then can I run the mysql commands to set the username and password (the ‘mysql>’ commands above)? I’m not familiar with databases so I don’t know if things need to get done in a certain order or not.</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Paul</div></div></body></html>