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

James Abernathy jfabernathy at gmail.com
Wed Mar 25 00:33:52 UTC 2020


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

> On 3/24/20 7:01 PM, James Abernathy wrote:
> > On Tue, Mar 24, 2020 at 7:59 PM James Abernathy <jfabernathy at gmail.com>
> > wrote:
> >
> >>
> >>
> >> On Tue, Mar 24, 2020 at 7:22 PM Bill Meek <keemllib at gmail.com> wrote:
> >>
> >>> On 3/24/20 3:44 PM, James Abernathy wrote:
> >>>>> I can login with the --default-extra-file
> >>>> The sudo dpkg-reconfigure mythtv-database didn't add much new text.
> >>>>
> >>>> jim at mythbuntu:~$ sudo dpkg-reconfigure mythtv-database
> >>>> Failed to create/alter user or grant permissions to database
> (incorrect
> >>>> admin username/password?)
> >>>> Try:
> >>>> sudo dpkg-reconfigure mythtv-database
> >>>
> >>> On line 42: mysql $SECURITY_INFO "$database" >/dev/null 2>&1;
> >>>
> >>> remove the:
> >>>
> >>>       >/dev/null
> >>>
> >>> That should allow the SQL error to print.
> >>>
> >>> The three queries (run as the MySQL root user) are:
> >>>
> >>> CREATE USER IF NOT EXISTS 'mythtv'@'%' IDENTIFIED WITH
> >>> mysql_native_password;
> >>> ALTER USER 'mythtv'@'%' IDENTIFIED BY 'your password here';
> >>> GRANT ALL ON mythconverg.* TO 'mythtv'@'%';
> >>>
> >>> --
> >>> Bill
> >>>
> >> jim at mythbuntu:~$ sudo dpkg-reconfigure mythtv-database
> >> ERROR 1064 (42000) at line 1: You have an error in your SQL syntax;
> check
> >> the manual that corresponds to your MariaDB server version for the right
> >> syntax to use near 'IF NOT EXISTS 'mythtv'@'%' IDENTIFIED WITH
> >> mysql_native_password' at line 1
> >> Failed to create/alter user or grant permissions to database (incorrect
> >> admin username/password?)
> >> Try:
> >> sudo dpkg-reconfigure mythtv-database
> >> jim at mythbuntu:~$
> >>
> >
> > If I run the command from the console I get this:
> > MariaDB [mysql]> CREATE USER IF NOT EXISTS 'mythtv'@'%' IDENTIFIED WITH
> > mysql_native_password;
> > ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual
> > that corresponds to your MariaDB server version for the right syntax to
> use
> > near 'IF NOT EXISTS 'mythtv'@'%' IDENTIFIED WITH mysql_native_password'
> at
> > line 1
> > MariaDB [mysql]>
>
> You're on Server version: 10.0.36-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04.
>
> My MariaDB tests are on Server version: 10.3.22-MariaDB-0ubuntu0.19.10.1
> Ubuntu 19.10.
>
> https://mariadb.com/kb/en/create-user/#if-not-exists says IF NOT EXISTS
> is OK
> for 10.3. Sounds like 10.0 doesn't support it.
>
> What happens if you do: CREATE USER 'blah'@'%'  IDENTIFIED WITH
> mysql_native_password;
> and then do it again?
>
> DROP USER blah; will get rid of the new user.
>
> --
> Bill
>

jim at mythbuntu:~$ sudo mysql -u root mysql
[sudo] password for jim:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1384
Server version: 10.0.36-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [mysql]> CREATE USER 'blah'@'%' IDENTIFIED WITH
mysql_native_password;
Query OK, 0 rows affected (0.04 sec)

MariaDB [mysql]> CREATE USER 'blah'@'%' IDENTIFIED WITH
mysql_native_password;
ERROR 1396 (HY000): Operation CREATE USER failed for 'blah'@'%'
MariaDB [mysql]>

Jim A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200324/9bf7f18d/attachment.htm>


More information about the mythtv-users mailing list