[mythtv-users] db restore
Daryl McDonald
darylangela at gmail.com
Wed Aug 8 22:54:02 UTC 2018
On Wed, Aug 8, 2018 at 3:32 PM, Daryl McDonald <darylangela at gmail.com>
wrote:
>
>
> On Mon, Aug 6, 2018 at 10:54 PM, Stephen Worthington <
> stephen_agent at jsw.gen.nz> wrote:
>
>> On Mon, 6 Aug 2018 16:28:15 -0400, you wrote:
>>
>> > mysql> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' IDENTIFIED
>> BY
>> >'mythtv' WITH GRANT OPTION;
>> >Query OK, 0 rows affected, 1 warning (0.01 sec)
>> >
>> >mysql> SET PASSWORD for 'mythtv' = PASSWORD('********');
>> >Query OK, 0 rows affected, 1 warning (0.00 sec)
>> >
>> >mysql> FLUSH PRIVILEGES;
>> >Query OK, 0 rows affected (0.00 sec)
>> >
>> >mysql> quit
>> >Bye
>> >
>> >Need I be concerned about the "zero rows affected" warning?
>>
>> I do not have MySQL installed anywhere to try the commands to give you
>> a certain answer to that (I use MariaDB), but I think that it is fine.
>>
>> >Have I been clear that this is a new install of Ubuntu DeskTop 16.04 and
>> >that Myth setup has never been opened?
>>
>> No, and that may explain the next problem below.
>>
>> >Trying to restore again gives:
>> >
>> >daryl at trieli:~$ sudo ./mythconverg_restore.pl --create_database
>> --directory
>> >~ --filename mythconverg-1344-20180804112717.sql.gz --verbose
>> >
>> >Configuring environment:
>> > - username: root
>> > - HOME: /home/daryl
>> > - MYTHCONFDIR: /home/daryl/.mythtv
>> >
>> >Parsing configuration files:
>> > - checking: /home/daryl/.mythtv/config.xml
>> > - checking: /usr/local/share/mythtv/mysql.txt
>> > - checking: /usr/share/mythtv/mysql.txt
>> > - checking: /usr/local/etc/mythtv/mysql.txt
>> > - checking: /etc/mythtv/mysql.txt
>> > - checking: /home/daryl/.mythtv/mysql.txt
>> > - checking: mysql.txt
>> > - checking: /home/daryl/.mythtv/mysql.txt
>> > - checking: /home/daryl/.mythtv/backuprc
>> >
>> >Applying command-line arguments.
>> >
>> >Checking configuration.
>> >
>> >WARNING: DBName not specified. Using mythconverg
>> >
>> >WARNING: DBHostName not specified.
>> > Assuming it is specified in the MySQL options file.
>> >
>> >WARNING: DBUserName not specified.
>> > Assuming it is specified in the MySQL options file.
>> >
>> >WARNING: DBPassword not specified.
>> > Assuming it is specified in the MySQL options file.
>> >
>> >Database Information:
>> > DBHostName:
>> > DBPort: -1
>> > DBUserName:
>> > DBPassword:
>> > DBName: mythconverg
>> > DBSchemaVer:
>> > DBBackupDirectory: /home/daryl
>> > DBBackupFilename: mythconverg-1344-20180804112717.sql.gz
>> > drop_database: no
>> > create_database: yes
>> >
>> >Executables:
>> > mysql_client: mysql
>> > uncompress: gzip -d
>> >
>> >Miscellaneous:
>> > partial_restore: no
>> > restore_xmltvids: no
>> > change_hostname: no
>> >
>> >Checking database.
>> >DBI connect('host=:database=mythconverg','',...) failed: Access denied
>> for
>> >user 'root'@'localhost' (using password: NO) at ./mythconverg_restore.pl
>> >line 933.
>> >
>> >Preparing initial database.
>> >DBI connect('host=','',...) failed: Access denied for user 'root'@
>> 'localhost'
>> >(using password: NO) at ./mythconverg_restore.pl line 933.
>> >
>> >Unable to connect to database.
>> > database: mythconverg
>> > host:
>> > username:
>> > password:
>> >
>> >Please check your configuration files to verify the database connection
>> >information is correct. The files that are used to retrieve connection
>> >information are prefixed with "parsing" in the "Parsing configuration
>> files"
>> >section of the --verbose output.
>> >
>> >Also note that any [client] or [mysql] password specified in the MySQL
>> >options
>> >file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take precedence
>> >over
>> >the password specified in the MythTV configuration files.
>> >
>> >ERROR: Unable to connect to database.
>>
>> From that, it appears that mythconverg_restore.pl is not finding a
>> config.xml or mysql.txt file to use for the user/password to access
>> the database. First, check if you have a /etc/mythtv directory. If
>> it is there and contains a config.xml file, then you should link to it
>> from the other places a config.xml file is needed, see below.
>>
>
> I re-did the new install (OS $ Myth), and yes there is a config.xml filoe
> in /etc/mythtv
>
>>
>> If there is not a /etc/mythtv directory or it does not contain a
>> config.xml file, then you need to create and populate it. I suspect
>> that running mythtv-setup will do that, so I would try that first,
>> from user "daryl". Do not bother to actually set up anything inside
>> mythtv-setup, as anything you do will be overwritten by the database
>> restore. Mythtv-setup may object to that and not want to exit, but
>> just answer the "do you really want to exit" type questions with "yes
>> I do" and exit it. Then check the following locations for config.xml
>> files:
>>
>> /etc/mythtv/config.xml
>> /home/mythtv/.mythtv/config.xml
>> /home/daryl/.mythtv/config.xml
>>
>> You need a config.xml file in each of those places. I have found that
>> in most circumstances, it is best to have just one config.xml file in
>> /etc/mythtv/config.xml and link to it from all other locations. So if
>> you now have a /etc/mythtv/config.xml file, then do this:
>>
>> sudo rm /home/mythtv/.mythtv/config.xml
>>
> done
>
>> sudo rm /home/daryl/.mythtv/config.xml
>>
> done
>
>> sudo mkdir /home/mythtv/.mythtv
>>
> done
>
>> sudo chown mythtv:mythtv /home/mythtv/.mythtv
>>
> done
>
>> sudo mkdir /home/mythtv/.mythtv (assumed /home/daryl/.mythtv)
>>
> done
>
>> sudo chown daryl:daryl /home/mythtv/.mythtv (assumed /home/daryl/.mythtv)
>>
> done
>
>> sudo ln -s /etc/mythtv/config.xml /home/mythtv/.mythtv/config.xml
>>
> done
>
>> sudo ln -s /etc/mythtv/config.xml /home/daryl/.mythtv/config.xml
>>
> done
>
>>
>> Do not worry if there are any error messages on any of those commands
>> except the "sudo ln" ones.
>>
>> Then check the /etc/mythtv/config.xml file and see if it has a
>> password you are happy with.
>
> it is other than the one I posted earlier, so I'm OK with it
>
>> If not, then create a new password
>> (using apg?) and edit it into the /etc/mythtv/config.xml file. To
>> edit /etc/mythtv/config.xml, this should work:
>>
>> sudo nano /etc/mythtv/config.xml
>>
>> If nano is not installed, install it and try again:
>>
>> sudo apt install nano
>>
>> Then you can try restoring the database again.
>>
>
> Thanks Stephen, so now am I ready to try to restore the database? I have
> not launched myth FE or BE, so do I need "--drop_database
> --create_database" arguments?
>
>> _______________________________________________
>>
>
I got the database restored, then fudged it editing fstab for storage
directory names, more fun tomorrow, hopefully I wont need to start a new
thread.
Thanks to all, this community is invaluable in maintaining such awesome
software.
> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180808/83db7154/attachment-0001.html>
More information about the mythtv-users
mailing list