Mailing List Archive

"WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version."
If you use mythtv-status, optimize_mythdb, mythexport or anything else
that is written in Perl and uses the database, then you may be getting
this warning message now:

WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a
future version.

It will happen every time the Perl DBD::mysql call is used, as the
Perl implementation of that call sets the MYSQL_OPT_RECONNECT option
to false, and any setting of the MYSQL_OPT_RECONNECT option triggers
the deprecation warning. The real problem is if you have
mythtv-status installed - it gets run regularly to update the motd
message, and each time it now gets this deprecation warning, it emails
you on your root@<hostname> email address. So you get hundreds of
these unwanted emails. If you do not have your root email address
enabled, you will not have this problem, but sensible people do have
their root email working so they can receive the reports from
optimize_mythdb each day to see if they have database problems.

The warning is caused by the installation of the latest
libmysqlclient21 version. On Ubuntu 22.04, the version that causes
this is package version 8.0.34:

root@mypvr:~# apt list -a libmysqlclient21
Listing... Done
libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
amd64 [upgradable from: 8.0.28-0ubuntu4]
libmysqlclient21/jammy,now 8.0.28-0ubuntu4 amd64 [installed,upgradable
to: 8.0.34-0ubuntu0.22.04.1]

libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
i386
libmysqlclient21/jammy 8.0.28-0ubuntu4 i386

If you have already been updated to this version, the workaround is to
downgrade to the latest previous version that is still available,
which is 8.0.28 in the Ubuntu 22.04 packages.

sudo apt install libmysqlclient21=8.0.28-0ubuntu4

Then you need to mark that version to be held instead of being
updated:

sudo apt-mark hold libmysqlclient21

If you have not yet been updated to the 8.0.34 version, you can just
do the hold command before that happens and you should be left on the
prior 8.0.33 version. The timing of the update to 8.0.34 varies due
to the new apt system where packages get rolled out to only a few
systems first, to see if they cause problems. So you may be lucky and
not have 8.0.34 yet. Two of my Ubuntu 22.04 systems had not been
updated, but my main MythTV box had, and had 60+ unwanted emails
waiting.

Reverting to a slightly older libmysqlclient21 version should not
cause any problems for now, but as other things get updated it may
cause problems later. Hopefully the Perl maintainers will fix the
DBD:mysql code before then, or some other fix will happen.

See:

https://stackoverflow.com/questions/76875569/warning-mysql-opt-reconnect-is-deprecated-and-will-be-removed-in-a-future-versi
https://github.com/perl5-dbi/DBD-mysql/issues/354
_______________________________________________
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: "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." [ In reply to ]
On 16/08/2023 07:52, Stephen Worthington wrote:
> If you use mythtv-status, optimize_mythdb, mythexport or anything else
> that is written in Perl and uses the database, then you may be getting
> this warning message now:
>
> WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a
> future version.
>
> It will happen every time the Perl DBD::mysql call is used, as the
> Perl implementation of that call sets the MYSQL_OPT_RECONNECT option
> to false, and any setting of the MYSQL_OPT_RECONNECT option triggers
> the deprecation warning. The real problem is if you have
> mythtv-status installed - it gets run regularly to update the motd
> message, and each time it now gets this deprecation warning, it emails
> you on your root@<hostname> email address. So you get hundreds of
> these unwanted emails. If you do not have your root email address
> enabled, you will not have this problem, but sensible people do have
> their root email working so they can receive the reports from
> optimize_mythdb each day to see if they have database problems.
>
> The warning is caused by the installation of the latest
> libmysqlclient21 version. On Ubuntu 22.04, the version that causes
> this is package version 8.0.34:
>
> root@mypvr:~# apt list -a libmysqlclient21
> Listing... Done
> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
> amd64 [upgradable from: 8.0.28-0ubuntu4]
> libmysqlclient21/jammy,now 8.0.28-0ubuntu4 amd64 [installed,upgradable
> to: 8.0.34-0ubuntu0.22.04.1]
>
> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
> i386
> libmysqlclient21/jammy 8.0.28-0ubuntu4 i386
>
> If you have already been updated to this version, the workaround is to
> downgrade to the latest previous version that is still available,
> which is 8.0.28 in the Ubuntu 22.04 packages.
>
> sudo apt install libmysqlclient21=8.0.28-0ubuntu4
>
> Then you need to mark that version to be held instead of being
> updated:
>
> sudo apt-mark hold libmysqlclient21
>
> If you have not yet been updated to the 8.0.34 version, you can just
> do the hold command before that happens and you should be left on the
> prior 8.0.33 version. The timing of the update to 8.0.34 varies due
> to the new apt system where packages get rolled out to only a few
> systems first, to see if they cause problems. So you may be lucky and
> not have 8.0.34 yet. Two of my Ubuntu 22.04 systems had not been
> updated, but my main MythTV box had, and had 60+ unwanted emails
> waiting.
>
> Reverting to a slightly older libmysqlclient21 version should not
> cause any problems for now, but as other things get updated it may
> cause problems later. Hopefully the Perl maintainers will fix the
> DBD:mysql code before then, or some other fix will happen.
>
> See:
>
> https://stackoverflow.com/questions/76875569/warning-mysql-opt-reconnect-is-deprecated-and-will-be-removed-in-a-future-versi
> https://github.com/perl5-dbi/DBD-mysql/issues/354

To be clear, is this a mysql problem, a mariadb problem, a library common to both or something
closer to mythtv?

Basically: I'm using mariadb, will this affect me?

--

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: "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." [ In reply to ]
On Wed, 16 Aug 2023 09:37:37 +0100, you wrote:

>On 16/08/2023 07:52, Stephen Worthington wrote:
>> If you use mythtv-status, optimize_mythdb, mythexport or anything else
>> that is written in Perl and uses the database, then you may be getting
>> this warning message now:
>>
>> WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a
>> future version.
>>
>> It will happen every time the Perl DBD::mysql call is used, as the
>> Perl implementation of that call sets the MYSQL_OPT_RECONNECT option
>> to false, and any setting of the MYSQL_OPT_RECONNECT option triggers
>> the deprecation warning. The real problem is if you have
>> mythtv-status installed - it gets run regularly to update the motd
>> message, and each time it now gets this deprecation warning, it emails
>> you on your root@<hostname> email address. So you get hundreds of
>> these unwanted emails. If you do not have your root email address
>> enabled, you will not have this problem, but sensible people do have
>> their root email working so they can receive the reports from
>> optimize_mythdb each day to see if they have database problems.
>>
>> The warning is caused by the installation of the latest
>> libmysqlclient21 version. On Ubuntu 22.04, the version that causes
>> this is package version 8.0.34:
>>
>> root@mypvr:~# apt list -a libmysqlclient21
>> Listing... Done
>> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
>> amd64 [upgradable from: 8.0.28-0ubuntu4]
>> libmysqlclient21/jammy,now 8.0.28-0ubuntu4 amd64 [installed,upgradable
>> to: 8.0.34-0ubuntu0.22.04.1]
>>
>> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
>> i386
>> libmysqlclient21/jammy 8.0.28-0ubuntu4 i386
>>
>> If you have already been updated to this version, the workaround is to
>> downgrade to the latest previous version that is still available,
>> which is 8.0.28 in the Ubuntu 22.04 packages.
>>
>> sudo apt install libmysqlclient21=8.0.28-0ubuntu4
>>
>> Then you need to mark that version to be held instead of being
>> updated:
>>
>> sudo apt-mark hold libmysqlclient21
>>
>> If you have not yet been updated to the 8.0.34 version, you can just
>> do the hold command before that happens and you should be left on the
>> prior 8.0.33 version. The timing of the update to 8.0.34 varies due
>> to the new apt system where packages get rolled out to only a few
>> systems first, to see if they cause problems. So you may be lucky and
>> not have 8.0.34 yet. Two of my Ubuntu 22.04 systems had not been
>> updated, but my main MythTV box had, and had 60+ unwanted emails
>> waiting.
>>
>> Reverting to a slightly older libmysqlclient21 version should not
>> cause any problems for now, but as other things get updated it may
>> cause problems later. Hopefully the Perl maintainers will fix the
>> DBD:mysql code before then, or some other fix will happen.
>>
>> See:
>>
>> https://stackoverflow.com/questions/76875569/warning-mysql-opt-reconnect-is-deprecated-and-will-be-removed-in-a-future-versi
>> https://github.com/perl5-dbi/DBD-mysql/issues/354
>
>To be clear, is this a mysql problem, a mariadb problem, a library common to both or something
>closer to mythtv?
>
>Basically: I'm using mariadb, will this affect me?

It affect everyone who uses libmysqlclient21, which is the connector
used by clients to talk to both MySQL and Mariadb. There is a
libmariadb3 connector library also, but most software just uses
libmysqlclient21 as it works with both MySQL and Mariadb. So yes, you
will be affected.
_______________________________________________
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: "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." [ In reply to ]
On Wed, Aug 16, 2023 at 4:55?AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Wed, 16 Aug 2023 09:37:37 +0100, you wrote:
>
> >On 16/08/2023 07:52, Stephen Worthington wrote:
> >> If you use mythtv-status, optimize_mythdb, mythexport or anything else
> >> that is written in Perl and uses the database, then you may be getting
> >> this warning message now:
> >>
> >> WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a
> >> future version.
> >>
> >> It will happen every time the Perl DBD::mysql call is used, as the
> >> Perl implementation of that call sets the MYSQL_OPT_RECONNECT option
> >> to false, and any setting of the MYSQL_OPT_RECONNECT option triggers
> >> the deprecation warning. The real problem is if you have
> >> mythtv-status installed - it gets run regularly to update the motd
> >> message, and each time it now gets this deprecation warning, it emails
> >> you on your root@<hostname> email address. So you get hundreds of
> >> these unwanted emails. If you do not have your root email address
> >> enabled, you will not have this problem, but sensible people do have
> >> their root email working so they can receive the reports from
> >> optimize_mythdb each day to see if they have database problems.
> >>
> >> The warning is caused by the installation of the latest
> >> libmysqlclient21 version. On Ubuntu 22.04, the version that causes
> >> this is package version 8.0.34:
> >>
> >> root@mypvr:~# apt list -a libmysqlclient21
> >> Listing... Done
> >> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
> >> amd64 [upgradable from: 8.0.28-0ubuntu4]
> >> libmysqlclient21/jammy,now 8.0.28-0ubuntu4 amd64 [installed,upgradable
> >> to: 8.0.34-0ubuntu0.22.04.1]
> >>
> >> libmysqlclient21/jammy-updates,jammy-security 8.0.34-0ubuntu0.22.04.1
> >> i386
> >> libmysqlclient21/jammy 8.0.28-0ubuntu4 i386
> >>
> >> If you have already been updated to this version, the workaround is to
> >> downgrade to the latest previous version that is still available,
> >> which is 8.0.28 in the Ubuntu 22.04 packages.
> >>
> >> sudo apt install libmysqlclient21=8.0.28-0ubuntu4
> >>
> >> Then you need to mark that version to be held instead of being
> >> updated:
> >>
> >> sudo apt-mark hold libmysqlclient21
> >>
> >> If you have not yet been updated to the 8.0.34 version, you can just
> >> do the hold command before that happens and you should be left on the
> >> prior 8.0.33 version. The timing of the update to 8.0.34 varies due
> >> to the new apt system where packages get rolled out to only a few
> >> systems first, to see if they cause problems. So you may be lucky and
> >> not have 8.0.34 yet. Two of my Ubuntu 22.04 systems had not been
> >> updated, but my main MythTV box had, and had 60+ unwanted emails
> >> waiting.
> >>
> >> Reverting to a slightly older libmysqlclient21 version should not
> >> cause any problems for now, but as other things get updated it may
> >> cause problems later. Hopefully the Perl maintainers will fix the
> >> DBD:mysql code before then, or some other fix will happen.
> >>
> >> See:
> >>
> >>
> https://stackoverflow.com/questions/76875569/warning-mysql-opt-reconnect-is-deprecated-and-will-be-removed-in-a-future-versi
> >> https://github.com/perl5-dbi/DBD-mysql/issues/354
> >
> >To be clear, is this a mysql problem, a mariadb problem, a library common
> to both or something
> >closer to mythtv?
> >
> >Basically: I'm using mariadb, will this affect me?
>
> It affect everyone who uses libmysqlclient21, which is the connector
> used by clients to talk to both MySQL and Mariadb. There is a
> libmariadb3 connector library also, but most software just uses
> libmysqlclient21 as it works with both MySQL and Mariadb. So yes, you
> will be affected.
>
>
I was not getting any mail at root, but I have a systemd service that
optimizes and backups the database daily. It's probably a script stolen
from you along the way. I did see the warning in the systemctl status
output, but not in the email I get sent as a part of my service which goes
to my normal gmail account. So you may have to look around for the warning.

The workaround has been applied without issue so far.

Thanks, as always Stephen.

Jim A
Re: "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." [ In reply to ]
A new version of libdbd-mysql-perl (4.050-5ubuntu0.22.04.1) has been
released which says it has a fix for this problem - it will no longer
be touching the MYSQL_OPT_RECONNECT option. Once this update is
installed, you can let libmysqlclient21 be updated to the latest
version:

sudo apt-mark unhold libmysqlclient21

and then do updates as usual.
_______________________________________________
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: "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version." [ In reply to ]
On Fri, Aug 18, 2023 at 1:10?PM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> A new version of libdbd-mysql-perl (4.050-5ubuntu0.22.04.1) has been
> released which says it has a fix for this problem - it will no longer
> be touching the MYSQL_OPT_RECONNECT option. Once this update is
> installed, you can let libmysqlclient21 be updated to the latest
> version:
>
> sudo apt-mark unhold libmysqlclient21
>
> and then do updates as usual.
> _______________________________________________
>

Thanks for the detailed instructions on this issue. So I got the update
package today and took it off hold. It updated as normal

JIm A