[mythtv-users] Several backends and passwords

Stephen Worthington stephen_agent at jsw.gen.nz
Sun May 13 14:17:51 UTC 2018


On Sun, 13 May 2018 15:48:32 +0200, you wrote:

>Hi,
>
>I have several backends on several computers with Debian.
>
>I wrote a little script to change password in ~/mythtv/config.xml each time I 
>use another backend.
>
>But it would be simpler to have the same password everywhere.
>
>Can I change password manually in /etc/mythtv/config.xml and then in ~/mythtv/
>config.xml ?
>
>Or is it better tu run "dpkg-reconfigure mythtv-database" and/or 
>"pkg-reconfigure mythtv-common" ?
>
>Or is there a better way I ignore ?
>
>Thanks for help
>
>Klaus

You can change the password of a user in the database:

https://mariadb.com/kb/en/library/set-password

From root if you run "mysql" then these commands, you will see the
list of users:

use mysql;
select user,host from user;

This is what I get:

MariaDB [mysql]> select user,host from user;
+--------+---------------------+
| user   | host                |
+--------+---------------------+
| mythtv | %                   |
| root   | localhost           |
| root   | savaidhg.jsw.gen.nz |
+--------+---------------------+
3 rows in set (0.00 sec)

So I have three users:

'mythtv'@'%'
'root'@'localhost'
'root'@'savaidhg.jsw.gen.nz'

To change the password for the mythtv user to 'new password', the
command would be:

set password for 'mythtv'@'%' = PASSWORD('new password');

If you want to see what access a user has to the database, use the
show grants command:

MariaDB [mysql]> show grants for mythtv@'%';
+-------------------------------------------------------------------------------------------------------+
| Grants for mythtv@%                                                                                   |
+-------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'mythtv'@'%' IDENTIFIED BY PASSWORD 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' |
| GRANT ALL PRIVILEGES ON `mythconverg`.* TO 'mythtv'@'%'                                               |
+-------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)


More information about the mythtv-users mailing list