[mythtv-users] error during upgrade from V30 to V31

James Abernathy jfabernathy at gmail.com
Tue Mar 24 18:45:39 UTC 2020


On Tue, Mar 24, 2020 at 2:37 PM Bill Meek <keemllib at gmail.com> wrote:

> On 3/24/20 12:36 PM, Jim Abernathy wrote:
> >
> > On 3/24/20 12:42 PM, Stephen Worthington wrote:
> >> On Tue, 24 Mar 2020 11:23:31 -0400, you wrote:
> >>
> >>> I've confused myself, so I'll start over on this issue.
> >>> I've upgraded to:
> >>>
> >>> mythtv: 2:31.0+fixes.202003231432.9579662~ubuntu18.04.1
> >>>
> >>> I got an error that recommended to run sudo dpkg-reconfigure
> >>> mythtv-database. If I run that I get a popup window asking about will
> other
> >>> computers run mythtv. I answered yes. I see get an error:
> >>>
> >>> sudo dpkg-reconfigure mythtv-database
> >>> Failed to create or modify database (incorrect admin
> username/password?)
> >>> Try:
> >>> sudo dpkg-reconfigure mythtv-database
> >>> jim at mythbuntu:~$
> >> Try looking in the log files to see if there is more information:
> >>
> >> /var/log/apt/term.log
> >> /var/log/apt/history.log
> >
> > Unfortunately those log reflect exactly what was on the console. I do
> not understand how the database could have an incorrect admin
> > username/password. Since this is Ubuntu, I use sudo for database
> commands when needed from the console, but mostly it's Mythtv FE/BE that
> use
> > the database.  MySQL Workbench that I setup long ago still works and I
> can view and modify parameters if needed.
> >
> > Could it be that way back in Ubuntu 16.04 I setup mythtv with a admin
> username and password that is not needed now but can generate an error.
> >
> > Bottom line is everything appears to be working from an operation point
> of view. It's just this error during apt upgrade of mythtv.
>
> Hmmm, this looks like something that was fixed got reverted. It's still OK
> in our packaging tree.
>
> Jim,
>
> Please look in: /var/lib/dpkg/info/mythtv-database.postinst
>
> There should be a lines like these:
>
> update_database() {
>      #Set up privs for mythtv at network
>      if ! echo "CREATE USER IF NOT EXISTS '$mythtv_username'@'%'
> IDENTIFIED WITH mysql_native_password; \
>                 ALTER USER '$mythtv_username'@'%' IDENTIFIED BY
> '$mythtv_password'; \
>                 GRANT ALL ON $database.* TO '$mythtv_username'@'%';" | \
>          mysql $SECURITY_INFO "$database" >/dev/null 2>&1; then
>          fail_database
>      fi
>
> But it appears that you'll see:
>
> update_database() {
>      #Set up privs for mythtv at network
>      if ! echo "GRANT ALL PRIVILEGES ON $database.* TO $mythtv_username@'%'
> IDENTIFIED BY '$mythtv_password';" | \
>          mysql $SECURITY_INFO "$database" >/dev/null 2>&1; then
>          fail_database
>      fi
>
> --
> Bill
>
I see

update_database() {
    #Set up privs for mythtv at network
    if ! echo "CREATE USER IF NOT EXISTS '$mythtv_username'@'%' IDENTIFIED
WITH mysql_native_password; \
               ALTER USER '$mythtv_username'@'%' IDENTIFIED BY
'$mythtv_password'; \
               GRANT ALL ON $database.* TO '$mythtv_username'@'%';" | \
        mysql $SECURITY_INFO "$database" >/dev/null 2>&1; then
        fail_database
    fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200324/ab9e71a5/attachment.htm>


More information about the mythtv-users mailing list