Mailing List Archive

Mythfrontend on Android-database access
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@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';


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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On Sun, 15 May 2022, 2:17 pm Donald Brett via mythtv-users, <
mythtv-users@mythtv.org> 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@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';
>

Not sure it could be the same issue but I once had a problem with
MythFrontend on a Chromecast with Google TV which couldn't connect to the
database. I eventually fixed it by having it connect by WiFi rather than
ethernet. Might be worth ruling out, at least.

>
Re: Mythfrontend on Android-database access [ In reply to ]
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@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@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
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@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@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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On Sun, 15 May 2022 13:11:27 -0500, you wrote:

>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

There is a big difference between

sudo mysql

and

mysql -u root -p

When mysql is run from root with no password, it has full permissions
for everything possible. When it is run as user root with "-u root",
it only has permissions a specified in the grants for user "root".

When you migrate a database (or restore an old one), only the
mythconverg database tables are migrated or restored by
mythconverg_restore.pl. Users and their grants are stored in the
"mysql" database tables, and are not touched, so you have to manually
set them up again. They must match what you have in your config.xml
files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
user>/.mythtv. When I move a database, I normally copy the old
config.xml files and re-create the old users and grants, but you can
choose to use the new config.xml settings too. But you still need to
create the users and grants.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On 16/05/2022 03:14, Stephen Worthington wrote:
> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>
>> 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
>
> There is a big difference between
>
> sudo mysql
>
> and
>
> mysql -u root -p
>
> When mysql is run from root with no password, it has full permissions
> for everything possible. When it is run as user root with "-u root",
> it only has permissions a specified in the grants for user "root".
>
> When you migrate a database (or restore an old one), only the
> mythconverg database tables are migrated or restored by
> mythconverg_restore.pl. Users and their grants are stored in the
> "mysql" database tables, and are not touched, so you have to manually
> set them up again. They must match what you have in your config.xml
> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
> user>/.mythtv. When I move a database, I normally copy the old
> config.xml files and re-create the old users and grants, but you can
> choose to use the new config.xml settings too. But you still need to
> create the users and grants.
>
Can I ask why the old users and grants are not migrated along with the database? After all, these
are essential metadata and having to (research and) re-input those commands introduces possibilities
for mistakes and errors.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On Mon, 16 May 2022 09:53:27 +0100, you wrote:

>On 16/05/2022 03:14, Stephen Worthington wrote:
>> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>>
>>> 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
>>
>> There is a big difference between
>>
>> sudo mysql
>>
>> and
>>
>> mysql -u root -p
>>
>> When mysql is run from root with no password, it has full permissions
>> for everything possible. When it is run as user root with "-u root",
>> it only has permissions a specified in the grants for user "root".
>>
>> When you migrate a database (or restore an old one), only the
>> mythconverg database tables are migrated or restored by
>> mythconverg_restore.pl. Users and their grants are stored in the
>> "mysql" database tables, and are not touched, so you have to manually
>> set them up again. They must match what you have in your config.xml
>> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
>> user>/.mythtv. When I move a database, I normally copy the old
>> config.xml files and re-create the old users and grants, but you can
>> choose to use the new config.xml settings too. But you still need to
>> create the users and grants.
>>
>Can I ask why the old users and grants are not migrated along with the database? After all, these
>are essential metadata and having to (research and) re-input those commands introduces possibilities
>for mistakes and errors.

My guess would be that it is way too difficult. Access to the users
and grants requires MySQL/MariaDB permissions on the "mysql" database.
The mythconverg_backup.pl program would need to be run as root to do
that, or as a MySQL/MariaDB user with the special permissions
required. And then which users need to be backed up and restored?
There would need to be options to allow the usernames to be specified
as there is no automated way of finding all the config.xml files you
are using and getting the usernames from them. They can be on
different PCs and devices. And the "create user" and "grant" commands
have been changing, so support would be needed for different versions
of MySQL and MariaDB doing things differently. And in any case, there
is no way to extract the passwords from MySQL/MariaDB - the design of
the way they work explicitly prevents that. So the passwords would
also need to be found in the config.xml files.

The names of the backup and restore programs (mythconverg_backup.pl
and mythconverg_restore.pl) also strongly suggest that they are only
going to work on the mythconverg database, not on data stored anywhere
else.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On 5/16/2022 5:28 AM, Stephen Worthington wrote:
> On Mon, 16 May 2022 09:53:27 +0100, you wrote:
>
>> On 16/05/2022 03:14, Stephen Worthington wrote:
>>> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>>>
>>>> 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
>>> There is a big difference between
>>>
>>> sudo mysql
>>>
>>> and
>>>
>>> mysql -u root -p
>>>
>>> When mysql is run from root with no password, it has full permissions
>>> for everything possible. When it is run as user root with "-u root",
>>> it only has permissions a specified in the grants for user "root".
>>>
>>> When you migrate a database (or restore an old one), only the
>>> mythconverg database tables are migrated or restored by
>>> mythconverg_restore.pl. Users and their grants are stored in the
>>> "mysql" database tables, and are not touched, so you have to manually
>>> set them up again. They must match what you have in your config.xml
>>> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
>>> user>/.mythtv. When I move a database, I normally copy the old
>>> config.xml files and re-create the old users and grants, but you can
>>> choose to use the new config.xml settings too. But you still need to
>>> create the users and grants.
>>>
>> Can I ask why the old users and grants are not migrated along with the database? After all, these
>> are essential metadata and having to (research and) re-input those commands introduces possibilities
>> for mistakes and errors.
> My guess would be that it is way too difficult. Access to the users
> and grants requires MySQL/MariaDB permissions on the "mysql" database.
> The mythconverg_backup.pl program would need to be run as root to do
> that, or as a MySQL/MariaDB user with the special permissions
> required. And then which users need to be backed up and restored?
> There would need to be options to allow the usernames to be specified
> as there is no automated way of finding all the config.xml files you
> are using and getting the usernames from them. They can be on
> different PCs and devices. And the "create user" and "grant" commands
> have been changing, so support would be needed for different versions
> of MySQL and MariaDB doing things differently. And in any case, there
> is no way to extract the passwords from MySQL/MariaDB - the design of
> the way they work explicitly prevents that. So the passwords would
> also need to be found in the config.xml files.
>
> The names of the backup and restore programs (mythconverg_backup.pl
> and mythconverg_restore.pl) also strongly suggest that they are only
> going to work on the mythconverg database, not on data stored anywhere
> else.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Hmm, I don't recall creating users or grants, so assumed it was done for
me on another step of the install.  I used this to load the previous
database:

sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database
--create_database --filename
/home/mythtv/db_backups/mythconverg-1350-20220501093643.sql.gz

Then adjusted config.xml to use the default password.

Anyway, I found a workaround for the mysql "identified by" issue here:

https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost

And tried:

mysql> drop user mythtv@'%';
mysql> flush privileges;
mysql> create user mythtv@'%' identified by 'mythtv';
mysql> flush privileges;
mysql> show grants for mythtv;

+------------------------------------+
| Grants for mythtv@%                |
+------------------------------------+
| GRANT USAGE ON *.* TO `mythtv`@`%` |
+------------------------------------+
1 row in set (0.00 sec)

mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
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.01 sec)

The local fe/be still works and now the ubuntu 18.04 box (johnny) has
access.  But the ONN still has the same problem.  By the way, I turned
off the V-32 backend and turned on the ubuntu 18.04 backend (on
johnny).  ONN found it and asked to update the database, so I assume it
was able to connect the it's mysql server.  I'll  check for differences
between them.

Don


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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On Mon, 16 May 2022 09:41:38 -0500, you wrote:

>Hmm, I don't recall creating users or grants, so assumed it was done for
>me on another step of the install.

When you install a clean system and it creates a new mythconverg
database, that is done with this file:

/usr/share/mythtv/sql/mc.sql

root@mypvr:/usr/share/mythtv/sql# cat mc.sql
CREATE DATABASE IF NOT EXISTS mythconverg;
CREATE USER IF NOT EXISTS 'mythtv'@'localhost' IDENTIFIED WITH
mysql_native_password;
ALTER USER 'mythtv'@'localhost' IDENTIFIED BY 'mythtv';
GRANT ALL ON mythconverg.* TO mythtv@localhost;
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost;
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;

So it sets up the mythtv@localhost user to match the default
/etc/mythtv/config.xml file.

> I used this to load the previous
>database:
>
>sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database
>--create_database --filename
>/home/mythtv/db_backups/mythconverg-1350-20220501093643.sql.gz
>
>Then adjusted config.xml to use the default password.
>
>Anyway, I found a workaround for the mysql "identified by" issue here:
>
>https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
>
>And tried:
>
>mysql> drop user mythtv@'%';
>mysql> flush privileges;
>mysql> create user mythtv@'%' identified by 'mythtv';
>mysql> flush privileges;
>mysql> show grants for mythtv;
>
>+------------------------------------+
>| Grants for mythtv@%??????????????? |
>+------------------------------------+
>| GRANT USAGE ON *.* TO `mythtv`@`%` |
>+------------------------------------+
>1 row in set (0.00 sec)
>
>mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
>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.01 sec)
>
>The local fe/be still works and now the ubuntu 18.04 box (johnny) has
>access.? But the ONN still has the same problem.? By the way, I turned
>off the V-32 backend and turned on the ubuntu 18.04 backend (on
>johnny).? ONN found it and asked to update the database, so I assume it
>was able to connect the it's mysql server.? I'll? check for differences
>between them.
>
>Don
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On 5/16/2022 9:41 AM, Donald Brett wrote:
> On 5/16/2022 5:28 AM, Stephen Worthington wrote:
>> On Mon, 16 May 2022 09:53:27 +0100, you wrote:
>>
>>> On 16/05/2022 03:14, Stephen Worthington wrote:
>>>> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>>>>
>>>>> 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
>>>> There is a big difference between
>>>>
>>>> sudo mysql
>>>>
>>>> and
>>>>
>>>> mysql -u root -p
>>>>
>>>> When mysql is run from root with no password, it has full permissions
>>>> for everything possible.  When it is run as user root with "-u root",
>>>> it only has permissions a specified in the grants for user "root".
>>>>
>>>> When you migrate a database (or restore an old one), only the
>>>> mythconverg database tables are migrated or restored by
>>>> mythconverg_restore.pl.  Users and their grants are stored in the
>>>> "mysql" database tables, and are not touched, so you have to manually
>>>> set them up again.  They must match what you have in your config.xml
>>>> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
>>>> user>/.mythtv.  When I move a database, I normally copy the old
>>>> config.xml files and re-create the old users and grants, but you can
>>>> choose to use the new config.xml settings too.  But you still need to
>>>> create the users and grants.
>>>>
>>> Can I ask why the old users and grants are not migrated along with
>>> the database? After all, these
>>> are essential metadata and having to (research and) re-input those
>>> commands introduces possibilities
>>> for mistakes and errors.
>> My guess would be that it is way too difficult.  Access to the users
>> and grants requires MySQL/MariaDB permissions on the "mysql" database.
>> The mythconverg_backup.pl program would need to be run as root to do
>> that, or as a MySQL/MariaDB user with the special permissions
>> required.  And then which users need to be backed up and restored?
>> There would need to be options to allow the usernames to be specified
>> as there is no automated way of finding all the config.xml files you
>> are using and getting the usernames from them.  They can be on
>> different PCs and devices.  And the "create user" and "grant" commands
>> have been changing, so support would be needed for different versions
>> of MySQL and MariaDB doing things differently.  And in any case, there
>> is no way to extract the passwords from MySQL/MariaDB - the design of
>> the way they work explicitly prevents that.  So the passwords would
>> also need to be found in the config.xml files.
>>
>> The names of the backup and restore programs (mythconverg_backup.pl
>> and mythconverg_restore.pl) also strongly suggest that they are only
>> going to work on the mythconverg database, not on data stored anywhere
>> else.
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
> Hmm, I don't recall creating users or grants, so assumed it was done
> for me on another step of the install.  I used this to load the
> previous database:
>
> sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database
> --create_database --filename
> /home/mythtv/db_backups/mythconverg-1350-20220501093643.sql.gz
>
> Then adjusted config.xml to use the default password.
>
> Anyway, I found a workaround for the mysql "identified by" issue here:
>
> https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
>
>
> And tried:
>
> mysql> drop user mythtv@'%';
> mysql> flush privileges;
> mysql> create user mythtv@'%' identified by 'mythtv';
> mysql> flush privileges;
> mysql> show grants for mythtv;
>
> +------------------------------------+
> | Grants for mythtv@%                |
> +------------------------------------+
> | GRANT USAGE ON *.* TO `mythtv`@`%` |
> +------------------------------------+
> 1 row in set (0.00 sec)
>
> mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
> 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.01 sec)
>
> The local fe/be still works and now the ubuntu 18.04 box (johnny) has
> access.  But the ONN still has the same problem.  By the way, I turned
> off the V-32 backend and turned on the ubuntu 18.04 backend (on
> johnny).  ONN found it and asked to update the database, so I assume
> it was able to connect the it's mysql server.  I'll  check for
> differences between them.
>
> Don
>

Users and grants are nearly identical between the two, so I logged into
the ONN to look for clues.  From windows powershell:

PS C:\Upgrades\platform-tools_r33.0.1-windows\platform-tools> ./ADB logcat
...long list of stuff, display scrolls until it goes to end of log, then
I try to start mythfrontend on the ONN.  Normal startup, then fails on
database connection, with:

05-16 11:41:47.162 10824 10858 E mfe     :
mythdbcon.cpp:237:OpenDatabase  [DBManager2] Unable to connect to database!
05-16 11:41:47.162 10824 10858 E mfe     :
mythdbcon.cpp:238:OpenDatabase  Driver error was [1/2058]:
05-16 11:41:47.162 10824 10858 E mfe     : QMYSQL: Unable to connect
05-16 11:41:47.162 10824 10858 E mfe     : Database error was:
05-16 11:41:47.162 10824 10858 E mfe     : Plugin caching_sha2_password
could not be loaded: dlopen failed: library
"/home/peter/proj/github.com/MythTV/packaging-master/android/libsinstall/lib/plugin/caching_sha2_password.so"
not found
05-16 11:41:52.108  3734  4486 E WifiService: Permission violation -
getConfiguredNetworks not allowed for uid=10035,
packageName=com.google.android.tvrecommendations,
reason=java.lang.SecurityException: Location mode is disabled for the device
05-16 11:41:52.484 10824 10858 I mfe     :
mythcontext.cpp:887:TestDBconnection  Start up testing connections. DB
192.168.0.184, BE , attempt 3, status dbStarted, Delay: 2000


, then repeats several times.  It looks like the latest mysql has a
change in password encryption.  I've seen suggestion to revert it by
adding this to /etc/mysql/mysql.conf.d/mysqld.cnf with
"mysql_native_password" , or, updating the root user to
"caching_sha2_password".  Not sure which way to go, suggestions?

Don


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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On Mon, 16 May 2022 12:20:05 -0500, you wrote:

>On 5/16/2022 9:41 AM, Donald Brett wrote:
>> On 5/16/2022 5:28 AM, Stephen Worthington wrote:
>>> On Mon, 16 May 2022 09:53:27 +0100, you wrote:
>>>
>>>> On 16/05/2022 03:14, Stephen Worthington wrote:
>>>>> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>>>>>
>>>>>> 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
>>>>> There is a big difference between
>>>>>
>>>>> sudo mysql
>>>>>
>>>>> and
>>>>>
>>>>> mysql -u root -p
>>>>>
>>>>> When mysql is run from root with no password, it has full permissions
>>>>> for everything possible.? When it is run as user root with "-u root",
>>>>> it only has permissions a specified in the grants for user "root".
>>>>>
>>>>> When you migrate a database (or restore an old one), only the
>>>>> mythconverg database tables are migrated or restored by
>>>>> mythconverg_restore.pl.? Users and their grants are stored in the
>>>>> "mysql" database tables, and are not touched, so you have to manually
>>>>> set them up again.? They must match what you have in your config.xml
>>>>> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
>>>>> user>/.mythtv.? When I move a database, I normally copy the old
>>>>> config.xml files and re-create the old users and grants, but you can
>>>>> choose to use the new config.xml settings too.? But you still need to
>>>>> create the users and grants.
>>>>>
>>>> Can I ask why the old users and grants are not migrated along with
>>>> the database? After all, these
>>>> are essential metadata and having to (research and) re-input those
>>>> commands introduces possibilities
>>>> for mistakes and errors.
>>> My guess would be that it is way too difficult.? Access to the users
>>> and grants requires MySQL/MariaDB permissions on the "mysql" database.
>>> The mythconverg_backup.pl program would need to be run as root to do
>>> that, or as a MySQL/MariaDB user with the special permissions
>>> required.? And then which users need to be backed up and restored?
>>> There would need to be options to allow the usernames to be specified
>>> as there is no automated way of finding all the config.xml files you
>>> are using and getting the usernames from them.? They can be on
>>> different PCs and devices.? And the "create user" and "grant" commands
>>> have been changing, so support would be needed for different versions
>>> of MySQL and MariaDB doing things differently.? And in any case, there
>>> is no way to extract the passwords from MySQL/MariaDB - the design of
>>> the way they work explicitly prevents that.? So the passwords would
>>> also need to be found in the config.xml files.
>>>
>>> The names of the backup and restore programs (mythconverg_backup.pl
>>> and mythconverg_restore.pl) also strongly suggest that they are only
>>> going to work on the mythconverg database, not on data stored anywhere
>>> else.
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users@mythtv.org
>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>> MythTV Forums: https://forum.mythtv.org
>>
>> Hmm, I don't recall creating users or grants, so assumed it was done
>> for me on another step of the install.? I used this to load the
>> previous database:
>>
>> sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database
>> --create_database --filename
>> /home/mythtv/db_backups/mythconverg-1350-20220501093643.sql.gz
>>
>> Then adjusted config.xml to use the default password.
>>
>> Anyway, I found a workaround for the mysql "identified by" issue here:
>>
>> https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
>>
>>
>> And tried:
>>
>> mysql> drop user mythtv@'%';
>> mysql> flush privileges;
>> mysql> create user mythtv@'%' identified by 'mythtv';
>> mysql> flush privileges;
>> mysql> show grants for mythtv;
>>
>> +------------------------------------+
>> | Grants for mythtv@%??????????????? |
>> +------------------------------------+
>> | GRANT USAGE ON *.* TO `mythtv`@`%` |
>> +------------------------------------+
>> 1 row in set (0.00 sec)
>>
>> mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
>> 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.01 sec)
>>
>> The local fe/be still works and now the ubuntu 18.04 box (johnny) has
>> access.? But the ONN still has the same problem.? By the way, I turned
>> off the V-32 backend and turned on the ubuntu 18.04 backend (on
>> johnny).? ONN found it and asked to update the database, so I assume
>> it was able to connect the it's mysql server.? I'll? check for
>> differences between them.
>>
>> Don
>>
>
>Users and grants are nearly identical between the two, so I logged into
>the ONN to look for clues.? From windows powershell:
>
>PS C:\Upgrades\platform-tools_r33.0.1-windows\platform-tools> ./ADB logcat
>...long list of stuff, display scrolls until it goes to end of log, then
>I try to start mythfrontend on the ONN.? Normal startup, then fails on
>database connection, with:
>
>05-16 11:41:47.162 10824 10858 E mfe???? :
>mythdbcon.cpp:237:OpenDatabase? [DBManager2] Unable to connect to database!
>05-16 11:41:47.162 10824 10858 E mfe???? :
>mythdbcon.cpp:238:OpenDatabase? Driver error was [1/2058]:
>05-16 11:41:47.162 10824 10858 E mfe???? : QMYSQL: Unable to connect
>05-16 11:41:47.162 10824 10858 E mfe???? : Database error was:
>05-16 11:41:47.162 10824 10858 E mfe???? : Plugin caching_sha2_password
>could not be loaded: dlopen failed: library
>"/home/peter/proj/github.com/MythTV/packaging-master/android/libsinstall/lib/plugin/caching_sha2_password.so"
>not found
>05-16 11:41:52.108? 3734? 4486 E WifiService: Permission violation -
>getConfiguredNetworks not allowed for uid=10035,
>packageName=com.google.android.tvrecommendations,
>reason=java.lang.SecurityException: Location mode is disabled for the device
>05-16 11:41:52.484 10824 10858 I mfe???? :
>mythcontext.cpp:887:TestDBconnection? Start up testing connections. DB
>192.168.0.184, BE , attempt 3, status dbStarted, Delay: 2000
>
>
>, then repeats several times.? It looks like the latest mysql has a
>change in password encryption.? I've seen suggestion to revert it by
>adding this to /etc/mysql/mysql.conf.d/mysqld.cnf with
>"mysql_native_password" , or, updating the root user to
>"caching_sha2_password".? Not sure which way to go, suggestions?
>
>Don

I think you will need to drop the user and re-create them like this:

DROP USER 'mythtv'@'%';
CREATE USER 'mythtv'@'%' IDENTIFIED WITH mysql_native_password;
ALTER USER 'mythtv'@'%' IDENTIFIED BY 'mythtv';

and do the GRANTs again.

Adding this:

[mysqld]
default-authentication-plugin=mysql_native_password

in the .cnf files will only affect new users created after you restart
MySQL.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On 5/16/2022 2:09 PM, Donald Brett wrote:
> On 5/16/2022 12:43 PM, Stephen Worthington wrote:
>> On Mon, 16 May 2022 12:20:05 -0500, you wrote:
>>
>>> On 5/16/2022 9:41 AM, Donald Brett wrote:
>>>> On 5/16/2022 5:28 AM, Stephen Worthington wrote:
>>>>> On Mon, 16 May 2022 09:53:27 +0100, you wrote:
>>>>>
>>>>>> On 16/05/2022 03:14, Stephen Worthington wrote:
>>>>>>> On Sun, 15 May 2022 13:11:27 -0500, you wrote:
>>>>>>>
>>>>>>>> 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
>>>>>>> There is a big difference between
>>>>>>>
>>>>>>> sudo mysql
>>>>>>>
>>>>>>> and
>>>>>>>
>>>>>>> mysql -u root -p
>>>>>>>
>>>>>>> When mysql is run from root with no password, it has full
>>>>>>> permissions
>>>>>>> for everything possible.  When it is run as user root with "-u
>>>>>>> root",
>>>>>>> it only has permissions a specified in the grants for user "root".
>>>>>>>
>>>>>>> When you migrate a database (or restore an old one), only the
>>>>>>> mythconverg database tables are migrated or restored by
>>>>>>> mythconverg_restore.pl.  Users and their grants are stored in the
>>>>>>> "mysql" database tables, and are not touched, so you have to
>>>>>>> manually
>>>>>>> set them up again.  They must match what you have in your
>>>>>>> config.xml
>>>>>>> files in /etc/mythtv, /home/mythtv/.mythtv and /home/<frontend
>>>>>>> user>/.mythtv.  When I move a database, I normally copy the old
>>>>>>> config.xml files and re-create the old users and grants, but you
>>>>>>> can
>>>>>>> choose to use the new config.xml settings too.  But you still
>>>>>>> need to
>>>>>>> create the users and grants.
>>>>>>>
>>>>>> Can I ask why the old users and grants are not migrated along with
>>>>>> the database? After all, these
>>>>>> are essential metadata and having to (research and) re-input those
>>>>>> commands introduces possibilities
>>>>>> for mistakes and errors.
>>>>> My guess would be that it is way too difficult.  Access to the users
>>>>> and grants requires MySQL/MariaDB permissions on the "mysql"
>>>>> database.
>>>>> The mythconverg_backup.pl program would need to be run as root to do
>>>>> that, or as a MySQL/MariaDB user with the special permissions
>>>>> required.  And then which users need to be backed up and restored?
>>>>> There would need to be options to allow the usernames to be specified
>>>>> as there is no automated way of finding all the config.xml files you
>>>>> are using and getting the usernames from them.  They can be on
>>>>> different PCs and devices.  And the "create user" and "grant"
>>>>> commands
>>>>> have been changing, so support would be needed for different versions
>>>>> of MySQL and MariaDB doing things differently.  And in any case,
>>>>> there
>>>>> is no way to extract the passwords from MySQL/MariaDB - the design of
>>>>> the way they work explicitly prevents that.  So the passwords would
>>>>> also need to be found in the config.xml files.
>>>>>
>>>>> The names of the backup and restore programs (mythconverg_backup.pl
>>>>> and mythconverg_restore.pl) also strongly suggest that they are only
>>>>> going to work on the mythconverg database, not on data stored
>>>>> anywhere
>>>>> else.
>>>>> _______________________________________________
>>>>> mythtv-users mailing list
>>>>> mythtv-users@mythtv.org
>>>>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>>>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>>>> MythTV Forums: https://forum.mythtv.org
>>>> Hmm, I don't recall creating users or grants, so assumed it was done
>>>> for me on another step of the install.  I used this to load the
>>>> previous database:
>>>>
>>>> sudo /usr/share/mythtv/mythconverg_restore.pl --drop_database
>>>> --create_database --filename
>>>> /home/mythtv/db_backups/mythconverg-1350-20220501093643.sql.gz
>>>>
>>>> Then adjusted config.xml to use the default password.
>>>>
>>>> Anyway, I found a workaround for the mysql "identified by" issue here:
>>>>
>>>> https://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost
>>>>
>>>>
>>>>
>>>> And tried:
>>>>
>>>> mysql> drop user mythtv@'%';
>>>> mysql> flush privileges;
>>>> mysql> create user mythtv@'%' identified by 'mythtv';
>>>> mysql> flush privileges;
>>>> mysql> show grants for mythtv;
>>>>
>>>> +------------------------------------+
>>>> | Grants for mythtv@%                |
>>>> +------------------------------------+
>>>> | GRANT USAGE ON *.* TO `mythtv`@`%` |
>>>> +------------------------------------+
>>>> 1 row in set (0.00 sec)
>>>>
>>>> mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
>>>> 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.01 sec)
>>>>
>>>> The local fe/be still works and now the ubuntu 18.04 box (johnny) has
>>>> access.  But the ONN still has the same problem.  By the way, I turned
>>>> off the V-32 backend and turned on the ubuntu 18.04 backend (on
>>>> johnny).  ONN found it and asked to update the database, so I assume
>>>> it was able to connect the it's mysql server.  I'll  check for
>>>> differences between them.
>>>>
>>>> Don
>>>>
>>> Users and grants are nearly identical between the two, so I logged into
>>> the ONN to look for clues.  From windows powershell:
>>>
>>> PS C:\Upgrades\platform-tools_r33.0.1-windows\platform-tools> ./ADB
>>> logcat
>>> ...long list of stuff, display scrolls until it goes to end of log,
>>> then
>>> I try to start mythfrontend on the ONN.  Normal startup, then fails on
>>> database connection, with:
>>>
>>> 05-16 11:41:47.162 10824 10858 E mfe     :
>>> mythdbcon.cpp:237:OpenDatabase  [DBManager2] Unable to connect to
>>> database!
>>> 05-16 11:41:47.162 10824 10858 E mfe     :
>>> mythdbcon.cpp:238:OpenDatabase  Driver error was [1/2058]:
>>> 05-16 11:41:47.162 10824 10858 E mfe     : QMYSQL: Unable to connect
>>> 05-16 11:41:47.162 10824 10858 E mfe     : Database error was:
>>> 05-16 11:41:47.162 10824 10858 E mfe     : Plugin caching_sha2_password
>>> could not be loaded: dlopen failed: library
>>> "/home/peter/proj/github.com/MythTV/packaging-master/android/libsinstall/lib/plugin/caching_sha2_password.so"
>>>
>>> not found
>>> 05-16 11:41:52.108  3734  4486 E WifiService: Permission violation -
>>> getConfiguredNetworks not allowed for uid=10035,
>>> packageName=com.google.android.tvrecommendations,
>>> reason=java.lang.SecurityException: Location mode is disabled for
>>> the device
>>> 05-16 11:41:52.484 10824 10858 I mfe     :
>>> mythcontext.cpp:887:TestDBconnection  Start up testing connections. DB
>>> 192.168.0.184, BE , attempt 3, status dbStarted, Delay: 2000
>>>
>>>
>>> , then repeats several times.  It looks like the latest mysql has a
>>> change in password encryption.  I've seen suggestion to revert it by
>>> adding this to /etc/mysql/mysql.conf.d/mysqld.cnf with
>>> "mysql_native_password" , or, updating the root user to
>>> "caching_sha2_password".  Not sure which way to go, suggestions?
>>>
>>> Don
>> I think you will need to drop the user and re-create them like this:
>>
>> DROP USER 'mythtv'@'%';
>> CREATE USER 'mythtv'@'%' IDENTIFIED WITH mysql_native_password;
>> ALTER USER 'mythtv'@'%' IDENTIFIED BY 'mythtv';
>>
>> and do the GRANTs again.
>>
>> Adding this:
>>
>> [mysqld]
>> default-authentication-plugin=mysql_native_password
>>
>> in the .cnf files will only affect new users created after you restart
>> MySQL.
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>
> Looks like that worked!  Here were the steps:
>
> mysql> DROP USER 'mythtv'@'%';
> mysql> CREATE USER 'mythtv'@'%' IDENTIFIED WITH mysql_native_password;
> mysql> ALTER USER 'mythtv'@'%' IDENTIFIED BY 'mythtv';
> mysql> grant all privileges on mythconverg.* to 'mythtv'@'%';
> mysql> flush privileges;
> 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> quit
> Bye
> don@scotty:~$ sudo systemctl restart mysql
>
> Mythfrontend takes about 30 seconds to start, then shows the first
> display; no errors on the TV or the log.  Thanks a ton for the help,
>
> Don
>
> PS - you're right about user creation, that's exactly how I did it;
> start with clean install of latest ubuntu, install mythtv, then used
> mythconverg_restore.pl to drop/create/install the old database. mc.sql
> did the work for me.
>


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

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Mythfrontend on Android-database access [ In reply to ]
On 5/16/2022 2:08 PM, Donald Brett wrote:
> On 5/15/2022 1:56 AM, Phill Edwards wrote:
>>
>>
>> On Sun, 15 May 2022, 2:17 pm Donald Brett via mythtv-users,
>> <mythtv-users@mythtv.org> 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@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';
>>
>>
>> Not sure it could be the same issue but I once had a problem with
>> MythFrontend on a Chromecast with Google TV which couldn't connect to
>> the database. I eventually fixed it by having it connect by WiFi
>> rather than ethernet. Might be worth ruling out, at least.
>
> Thanks for the suggestion, but I was already on wireless.  Ended up
> making adjustment in mysql to get it going.
>
> Don
>
> PS - still have some latency, so will try switching over to Ethernet.
>
>


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