[mythtv-users] my bad

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Sep 20 01:15:29 UTC 2017


On Tue, 19 Sep 2017 20:32:17 -0400, you wrote:

>On Tue, Sep 19, 2017 at 8:25 PM, Daryl McDonald <darylangela at gmail.com>
>wrote:
>
>> Trying to get the android frontend to connect to the database I did this:
>>
>> mysql -u root -p mysql
>> mysql> grant all on mythconverg.* to 'mythtv'@'%' identified by 'passwd';
>> mysql> flush privileges;
>> mysql> exit;
>>
>> and now I can't connect to the BE on the combined box (16.04/0.28) and trying to restore a database results in this:
>>
>> trieli at mythtv:~$ mythconverg_restore.pl --drop_database --create_database --filename mythconverg-1344-20170919104850.sql.gz --verbose
>>
>> Configuring environment:
>>   -    username: trieli
>>   -        HOME: /home/trieli
>>   - MYTHCONFDIR: /home/trieli/.mythtv
>>
>> Parsing configuration files:
>>   - checking: /home/trieli/.mythtv/config.xml
>>      parsing: /home/trieli/.mythtv/config.xml
>>   - checking: /home/trieli/.mythtv/backuprc
>>      parsing: /home/trieli/.mythtv/backuprc
>>
>> Applying command-line arguments.
>>
>> Checking configuration.
>>
>> Database Information:
>>          DBHostName: localhost
>>              DBPort: 3306
>>          DBUserName: mythtv
>>          DBPassword: XXX
>>              DBName: mythconverg
>>         DBSchemaVer:
>>   DBBackupDirectory: /media/storage/mythtv/db_backups
>>    DBBackupFilename: mythconverg-1344-20170919104850.sql.gz
>>       drop_database: yes
>>     create_database: yes
>>
>> Executables:
>>        mysql_client: mysql
>>          uncompress: gzip -d
>>
>> Miscellaneous:
>>     partial_restore: no
>>    restore_xmltvids: no
>>     change_hostname: no
>>
>> Checking database.
>>
>> Preparing initial database.
>>
>> Unable to connect to database.
>>            database: mythconverg
>>                host: localhost
>>            username: mythtv
>>            password: 7HVMRTtn
>>
>> 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.
>> trieli at mythtv:~$
>>
>> Please help! thanks in advance Daryl
>>
>>
>>
>I'm not sure, but I think you set your mysql mythconverg password to
>'passwd'.  You could change this in your /home/trieli/.mythtv/config.xml
>file (put 'passwd' instead of '7HVMRTtn').
>
>There is definitely a way to set the password to your other password
>(7HVMRTtn) but I don't know specifics on that.  I usually roll with just
>mythtv as my password.
>
>Having 'passwd' as your password would probably be fine, but if that
>bothers you, someone will probably pipe in with the mysql command to change
>it.  You can probably look that up yourself.
>
>Jerry

Jerry is correct - you set the password in MySQL to 'passwd', but the
password in your config.xml file is '7HVMRTtn'.  The database restore
only restores the 'mythconverg' database.  The MySQL users and
passwords are stored in the 'mysql' database, and are not affected by
backups and restores.  So you need to either change all your
config.xml files to use the 'passwd' password, or change the password
in MySQL back to '7HVMRTtn', which should be able to be done by the
same commands, but with the right password:

mysql -u root -p mysql
grant all on mythconverg.* to 'mythtv'@'%' identified by '7HVMRTtn';
flush privileges;
exit;

The 'mysql -u root -p mysql' command has 'mysql' at the end of it -
that is telling the mysql command to open the 'mysql' database.  The
output of the mysql command gives you a prompt 'mysql> ' to remind you
of which database the commands are being executed on.

After correcting the password problem, there is no need to restore the
'mythconverg' database - it has not been changed.


More information about the mythtv-users mailing list