[mythtv-users] Mythfrontend on Android-database access

Donald Brett dlbrett108 at yahoo.com
Sun May 15 18:11:27 UTC 2022


On 5/15/2022 5:43 AM, Stephen Worthington wrote:
> On Sat, 14 May 2022 23:15:33 -0500, you wrote:
>
>> Just built a new fe/be box with V-32, went OK and is working pretty
>> well.  My PC's video card (GeForce GT 710) is having jitter problems
>> with anything over 720 resolution.  It's may be a little under powered,
>> so I'm trying the frontend alternatives on a Walmart ONN box.
>>
>> Leanfront works well; everything worked except one clip that had a
>> server error.  The clip is 4K @ 60fps.  Other 4K clips work fine at
>> lower frame rates, so I assume that's the issue.  Also trying
>> Mythfrontend, but hit a snag.
>>
>> When Mythfrontend starts, it shows the startup status display, with
>> "Attempting to connect to Database".  Did a lot of searching but ran out
>> of things to check.  Mythbackend is running (Active: active (running)),
>> PIN is '0000', mysql is listening (bind-address=0.0.0.0).  Also tried
>> connecting from a ubuntu 18.04 box, with the similar result:
>>
>> don at johnny:~$ sudo mysql -umythtv -h192.168.0.184 -p
>> Enter password:
>> ERROR 1045 (28000): Access denied for user 'mythtv'@'johnny' (using
>> password: YES)
>>
>> Sounds like mysql has a permission problem; what should I look for?
>>
>> Don
>>
>> PS - this failed, apparently "IDENTIFIED BY" is deprecated?
>> GRANT ALL ON mythconverg.* TO 'mythtv'@'%' IDENTIFIED BY 'mythtv';
> Are you running MySQL or MariaDB?  Permissions is an area where they
> do differ a little.  And also an area where there have been some
> changes.  When messing around with users and permissions, it is best
> to use a passwordless root mysql login to ensure you have permissions
> to show or grant permissions.
>
> What does this show?
>
> sudo mysql
> show grants for 'mythtv'@'%';
> show grants for 'mythtv'@'johnny';
> quit
>
> The "show grants" command is fairly new - you may not have seen it
> before.
>
> If you want to grant all permissions on everything to mythtv@%, and
> mythtv@% is already an existing user, then this should work:
>
> grant all on *.* to 'mythtv'@'%' with grant option;
>
> Or if you only want to grant all permissions on the mythconverg
> database:
>
> grant all on mythconverg.* to 'mythtv'@'%' with grant option;
>
> I believe that it no longer possible to use "identified by" on a grant
> command in order to create a user and grant permissions in the same
> command.  You need to create the user as a separate command first:
>
> create user 'mythtv'@'%' identified by '<password>';
> _______________________________________________
> 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
Using mysql V-8.0.29-0 and ubuntu 0.20.04.3.


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


mysql> show grants for 'mythtv'@'johnny';
ERROR 1141 (42000): There is no such grant defined for user 'mythtv' on 
host 'johnny'


Hmm, very strange.  It looks like user 'mythtv' has access to any 
database.table, from anywhere; but not really.

Tried the mythconverg only approach:

mysql> grant all on mythconverg.* to 'mythtv'@'%' with grant option;
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> exit

Same result, access denied.

Tried all database.table also:

mysql> grant all on *.* to 'mythtv'@'%' with grant option;
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
mysql> exit
Bye

Same result, access denied.

Did some experimenting:
User 'root' has permissions on localhost, then:

mysql> SHOW GRANTS FOR 'root'@'192.168.0.184';
ERROR 1141 (42000): There is no such grant defined for user 'root' on 
host '192.168.0.184'
mysql> SHOW GRANTS FOR 'root'@'scotty';
ERROR 1141 (42000): There is no such grant defined for user 'root' on 
host 'scotty'

mysql> SHOW GRANTS FOR 'root'@'192.168.0.177';
ERROR 1141 (42000): There is no such grant defined for user 'root' on 
host '192.168.0.177'
mysql> SHOW GRANTS FOR 'root'@'johnny';
ERROR 1141 (42000): There is no such grant defined for user 'root' on 
host 'johnny'

mysql> SHOW GRANTS FOR 'mythtv'@'loalhost';
ERROR 1141 (42000): There is no such grant defined for user 'mythtv' on 
host 'loalhost'
mysql> SHOW GRANTS FOR 'mythtv'@'johnny';
ERROR 1141 (42000): There is no such grant defined for user 'mythtv' on 
host 'johnny'
mysql> SHOW GRANTS FOR 'mythtv'@'192.164.0.184';
ERROR 1141 (42000): There is no such grant defined for user 'mythtv' on 
host '192.164.0.184'

By the way, a couple more data points; the mysql root user does not have 
a password.  Also, the mythfrontend password is still mythtv, not the 
generated one (y2i1MpJ8).  When migrating the old database to the new 
machine, it seems to use the stock 'mythtv' password, so I left it as-is 
(changed config.xml password).  Any other suggestions?

Don


-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mythtv-users mailing list