<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 6, 2018 at 8:03 AM, Stephen Worthington <span dir="ltr"><<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Mon, 6 Aug 2018 07:30:00 -0400, you wrote:<br>
<br>
>On Sun, Aug 5, 2018 at 1:44 PM, Stephen Worthington <<br>
><a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br>
><br>
>> On Sun, 5 Aug 2018 11:30:14 -0400, you wrote:<br>
>><br>
>> >On Sun, Aug 5, 2018 at 11:06 AM, Stephen Worthington <./<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> --create_database<div class="gmail-h5">>> --directory ~</div><div class="gmail-h5">>> >> >--filename mythconverg-1344-20180804112717.sql.gz --verbose</div>
>> ><a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br>
>> ><br>
>> >> On Sun, 5 Aug 2018 10:48:01 -0400, you wrote:<br>
>> >><br>
>> >><br>
>> >> >I'm still getting nowhere:<br>
>> >> > daryl@trieli:~$ ./<a href="http://mythconverg_restore.pl" rel="noreferrer" target="_blank">mythconverg_restore.pl</a> --create_database<br>
>> --directory ~<br>
>> >> >--filename mythconverg-1344-<wbr>20180804112717.sql.gz --verbose<br>
>> >> ><br>
>> >> >Configuring environment:<br>
>> >> >  -    username: daryl<br>
>> >> >  -        HOME: /home/daryl<br>
>> >> >  - MYTHCONFDIR: /home/daryl/.mythtv<br>
>> >> ><br>
>> >> >Parsing configuration files:<br>
>> >> >  - checking: /home/daryl/.mythtv/config.xml<br>
>> >> >  - checking: /usr/local/share/mythtv/mysql.<wbr>txt<br>
>> >> >  - checking: /usr/share/mythtv/mysql.txt<br>
>> >> >  - checking: /usr/local/etc/mythtv/mysql.<wbr>txt<br>
>> >> >  - checking: /etc/mythtv/mysql.txt<br>
>> >> >  - checking: /home/daryl/.mythtv/mysql.txt<br>
>> >> >  - checking: mysql.txt<br>
>> >> >  - checking: /home/daryl/.mythtv/mysql.txt<br>
>> >> >  - checking: /home/daryl/.mythtv/backuprc<br>
>> >> ><br>
>> >> >Applying command-line arguments.<br>
>> >> ><br>
>> >> >Checking configuration.<br>
>> >> ><br>
>> >> >WARNING: DBName not specified. Using mythconverg<br>
>> >> ><br>
>> >> >WARNING: DBHostName not specified.<br>
>> >> >         Assuming it is specified in the MySQL options file.<br>
>> >> ><br>
>> >> >WARNING: DBUserName not specified.<br>
>> >> >         Assuming it is specified in the MySQL options file.<br>
>> >> ><br>
>> >> >WARNING: DBPassword not specified.<br>
>> >> >         Assuming it is specified in the MySQL options file.<br>
>> >> ><br>
>> >> >Database Information:<br>
>> >> >         DBHostName:<br>
>> >> >             DBPort: -1<br>
>> >> >         DBUserName:<br>
>> >> >         DBPassword:<br>
>> >> >             DBName: mythconverg<br>
>> >> >        DBSchemaVer:<br>
>> >> >  DBBackupDirectory: /home/daryl<br>
>> >> >   DBBackupFilename: mythconverg-1344-<wbr>20180804112717.sql.gz<br>
>> >> >      drop_database: no<br>
>> >> >    create_database: yes<br>
>> >> ><br>
>> >> >Executables:<br>
>> >> >       mysql_client: mysql<br>
>> >> >         uncompress: gzip -d<br>
>> >> ><br>
>> >> >Miscellaneous:<br>
>> >> >    partial_restore: no<br>
>> >> >   restore_xmltvids: no<br>
>> >> >    change_hostname: no<br>
>> >> ><br>
>> >> >Checking database.<br>
>> >> >DBI connect('host=:database=<wbr>mythconverg','',...) failed: Access denied<br>
>> >> for<br>
>> >> >user 'daryl'@'localhost' (using password: NO) at ./<br>
>> <a href="http://mythconverg_restore.pl" rel="noreferrer" target="_blank">mythconverg_restore.pl</a><br>
>> >> >line 933.<br>
>> >> ><br>
>> >> >Preparing initial database.<br>
>> >> >DBI connect('host=','',...) failed: Access denied for user 'daryl'@<br>
>> >> 'localhost'<br>
>> >> >(using password: NO) at ./<a href="http://mythconverg_restore.pl" rel="noreferrer" target="_blank">mythconverg_restore.pl</a> line 933.<br>
>> >> ><br>
>> >> >Unable to connect to database.<br>
>> >> >           database: mythconverg<br>
>> >> >               host:<br>
>> >> >           username:<br>
>> >> >           password:<br>
>> >> ><br>
>> >> >Please check your configuration files to verify the database connection<br>
>> >> >information is correct.  The files that are used to retrieve connection<br>
>> >> >information are prefixed with "parsing" in the "Parsing configuration<br>
>> >> files"<br>
>> >> >section of the --verbose output.<br>
>> >> ><br>
>> >> >Also note that any [client] or [mysql] password specified in the MySQL<br>
>> >> >options<br>
>> >> >file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take<br>
>> precedence<br>
>> >> >over<br>
>> >> >the password specified in the MythTV configuration files.<br>
>> >> ><br>
>> >> >ERROR: Unable to connect to database.<br>
>> >><br>
>> >> It looks like you have restored the /etc/mythtv/config.xml file, which<br>
>> >> contains the password to access the mythconverg database.  But the<br>
>> >> MariaDB or MySQL database system you are restoring to is clean - it<br>
>> >> does not have the user/password that was in your old database to allow<br>
>> >> access to the mythconverg database.  The user/password data is not<br>
>> >> stored in the mythconverg database - it is stored in a separate system<br>
>> >> maintained database, and can not be restored by<br>
>> >> <a href="http://mythconverg_restore.pl" rel="noreferrer" target="_blank">mythconverg_restore.pl</a>.<br>
>> >><br>
>> >> So what you need to do is to do the SQL commands needed to add the<br>
>> >> user/password from /etc/mythtv/config.xml into the MySQL<br>
>> >> authentication system.  See this page for how:<br>
>> >><br>
>> >> <a href="https://www.mythtv.org/wiki/Category:MySQL" rel="noreferrer" target="_blank">https://www.mythtv.org/wiki/<wbr>Category:MySQL</a><br>
>> >><br>
>> >> Search for "Access denied for user".<br>
>> >><br>
>> ><br>
>> >I don't think this went as it should have:<br>
>> ><br>
>> >Enter password:<br>
>> >Reading table information for completion of table and column names<br>
>> >You can turn off this feature to get a quicker startup with -A<br>
>> ><br>
>> >Welcome to the MySQL monitor.  Commands end with ; or \g.<br>
>> >Your MySQL connection id is 42<br>
>> >Server version: 5.7.23-0ubuntu0.16.04.1 (Ubuntu)<br>
>> ><br>
>> >Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights<br>
>> reserved.<br>
>> ><br>
>> >Oracle is a registered trademark of Oracle Corporation and/or its<br>
>> >affiliates. Other names may be trademarks of their respective<br>
>> >owners.<br>
>> ><br>
>> >Type 'help;' or '\h' for help. Type '\c' to clear the current input<br>
>> >statement.<br>
>> ><br>
>> >mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' IDENTIFIED BY<br>
>> >'mythtv' WITH GRANT OPTION;<br>
>> >Query OK, 0 rows affected, 1 warning (0.02 sec)<br>
>> ><br>
>> >mysql> UPDATE user SET Password=h2TGgzwD('mythtv') WHERE user='mythtv';<br>
>> >ERROR 1054 (42S22): Unknown column 'Password' in 'field list'<br>
>> >mysql> FLUSH PRIVELIGES<br>
>><br>
>> You have misinterpreted the syntax of the GRANT command.  PASSWORD()<br>
>> is a function that encrypts a plain-text password for storage into the<br>
>> database.  So the command should be:<br>
>><br>
>> UPDATE user SET Password=PASSWORD('h2TGgzwD') where user='mythtv';<br>
>><br>
>> But as you have posted the actual password publicly here, it would be<br>
>> a good idea to run the apg command (install with "apt install apg" if<br>
>> necessary) and generate a new password to use, and put that in<br>
>> /etc/mythtv/config.xml and in the above command.<br>
>><br>
><br>
>With proper syntax (copy&paste) it still looks unproductive:<br>
>daryl@trieli:~$ mysql -u root -p mysql<br>
>Enter password:<br>
>Reading table information for completion of table and column names<br>
>You can turn off this feature to get a quicker startup with -A<br>
><br>
>Welcome to the MySQL monitor.  Commands end with ; or \g.<br>
>Your MySQL connection id is 12<br>
>Server version: 5.7.23-0ubuntu0.16.04.1 (Ubuntu)<br>
><br>
>Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.<br>
><br>
>Oracle is a registered trademark of Oracle Corporation and/or its<br>
>affiliates. Other names may be trademarks of their respective<br>
>owners.<br>
><br>
>Type 'help;' or '\h' for help. Type '\c' to clear the current input<br>
>statement.<br>
><br>
>mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' IDENTIFIED BY<br>
>'mythtv' WITH GRANT OPTION;<br>
>Query OK, 0 rows affected, 1 warning (0.01 sec)<br>
><br>
>mysql> UPDATE user SET Password=PASSWORD('mythtv') WHERE user='mythtv';<br>
>ERROR 1054 (42S22): Unknown column 'Password' in 'field list'<br>
>mysql> FLUSH PRIVILEGES;<br>
>Query OK, 0 rows affected (0.00 sec)<br>
><br>
>mysql> quit<br>
>Bye<br>
<br>
</div></div>I have done some web searching and it seems that things have changed<br>
with the latest version of MySQL (5.7).  MariaDB still works with the<br>
UPDATE command as above, but MySQL does not.  So try this command<br>
instead:<br>
<br>
SET PASSWORD for 'mythtv' = PASSWORD('your new password');<br></blockquote><div><br></div><div> mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' IDENTIFIED BY 'mythtv' WITH GRANT OPTION;</div><div>Query OK, 0 rows affected, 1 warning (0.01 sec)</div><div><br></div><div>mysql> SET PASSWORD for 'mythtv' = PASSWORD('********');</div><div>Query OK, 0 rows affected, 1 warning (0.00 sec)</div><div><br></div><div>mysql> FLUSH PRIVILEGES;</div><div>Query OK, 0 rows affected (0.00 sec)</div><div><br></div><div>mysql> quit</div><div>Bye</div><div><br></div><div>Need I be concerned about the "zero rows affected" warning?</div><div><br></div><div>Have I been clear that this is a new install of Ubuntu DeskTop 16.04 and that Myth setup has never been opened?</div><div><br></div><div>Trying to restore again gives:</div><div><br></div><div><div>daryl@trieli:~$ sudo ./<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> --create_database --directory ~ --filename mythconverg-1344-20180804112717.sql.gz --verbose</div><div><br></div><div>Configuring environment:</div><div>  -    username: root</div><div>  -        HOME: /home/daryl</div><div>  - MYTHCONFDIR: /home/daryl/.mythtv</div><div><br></div><div>Parsing configuration files:</div><div>  - checking: /home/daryl/.mythtv/config.xml</div><div>  - checking: /usr/local/share/mythtv/mysql.txt</div><div>  - checking: /usr/share/mythtv/mysql.txt</div><div>  - checking: /usr/local/etc/mythtv/mysql.txt</div><div>  - checking: /etc/mythtv/mysql.txt</div><div>  - checking: /home/daryl/.mythtv/mysql.txt</div><div>  - checking: mysql.txt</div><div>  - checking: /home/daryl/.mythtv/mysql.txt</div><div>  - checking: /home/daryl/.mythtv/backuprc</div><div><br></div><div>Applying command-line arguments.</div><div><br></div><div>Checking configuration.</div><div><br></div><div>WARNING: DBName not specified. Using mythconverg</div><div><br></div><div>WARNING: DBHostName not specified.</div><div>         Assuming it is specified in the MySQL options file.</div><div><br></div><div>WARNING: DBUserName not specified.</div><div>         Assuming it is specified in the MySQL options file.</div><div><br></div><div>WARNING: DBPassword not specified.</div><div>         Assuming it is specified in the MySQL options file.</div><div><br></div><div>Database Information:</div><div>         DBHostName: </div><div>             DBPort: -1</div><div>         DBUserName: </div><div>         DBPassword: </div><div>             DBName: mythconverg</div><div>        DBSchemaVer: </div><div>  DBBackupDirectory: /home/daryl</div><div>   DBBackupFilename: mythconverg-1344-20180804112717.sql.gz</div><div>      drop_database: no</div><div>    create_database: yes</div><div><br></div><div>Executables:</div><div>       mysql_client: mysql</div><div>         uncompress: gzip -d</div><div><br></div><div>Miscellaneous:</div><div>    partial_restore: no</div><div>   restore_xmltvids: no</div><div>    change_hostname: no</div><div><br></div><div>Checking database.</div><div>DBI connect('host=:database=mythconverg','',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at ./<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> line 933.</div><div><br></div><div>Preparing initial database.</div><div>DBI connect('host=','',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at ./<a href="http://mythconverg_restore.pl">mythconverg_restore.pl</a> line 933.</div><div><br></div><div>Unable to connect to database.</div><div>           database: mythconverg</div><div>               host: </div><div>           username: </div><div>           password: </div><div><br></div><div>Please check your configuration files to verify the database connection</div><div>information is correct.  The files that are used to retrieve connection</div><div>information are prefixed with "parsing" in the "Parsing configuration files"</div><div>section of the --verbose output.</div><div><br></div><div>Also note that any [client] or [mysql] password specified in the MySQL options</div><div>file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take precedence over</div><div>the password specified in the MythTV configuration files.</div><div><br></div><div>ERROR: Unable to connect to database.</div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail-HOEnZb"><div class="gmail-h5">______________________________<wbr>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/<wbr>mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/<wbr>Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</div></div></blockquote></div><br></div></div>