[mythtv-users] Update: problem solved! Thank you! Details inside.
A. F. Cano
afc54 at comcast.net
Fri Jan 15 02:57:20 UTC 2021
On Thu, Jan 14, 2021 at 07:55:42PM -0600, Bill Meek wrote:
>> About not being able to do anything at all from root at localhost.
>
> Maybe this one: https://stackoverflow.com/questions/1709078/how-can-i-restore-the-mysql-root-user-s-full-privileges
>
> --skip-grant-tables
I had tried this many times before but I was missing something,
obviously.
The above link was the key. I had to do some things differently but in
the end I got root access back with all privileges and after adding the
privileges for mythtv, the server is working again.
This is what I had to do:
# /etc/init.d/mysqld stop
In one window:
# mysqld_safe --skip-grant tables (this process will hang then)
In another window:
# mysql (as hinted in the above link, no user or password was required)
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.27-MariaDB-0+deb10u1 Debian 10
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 [(none)]> update mysql.user set grant_priv='Y', super_priv='Y' where user='root';
Query OK, 1 row affected (0.031 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.016 sec)
MariaDB [(none)]> grant all on *.* to 'root'@'localhost';
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> quit
Bye
# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.3.27-MariaDB-0+deb10u1 Debian 10
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 [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> use mythconverg;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mythconverg]> grant all on mythconverg.* to 'mythtv'@'localhost' identified by 'mythtv' with grant option;
Query OK, 0 rows affected (0.016 sec)
MariaDB [mythconverg]> grant all on mythconverg.* to 'mythtv'@'%' identified by 'mythtv' with grant option;
Query OK, 0 rows affected (0.000 sec)
MariaDB [mythconverg]> flush privileges;
Query OK, 0 rows affected (0.000 sec)
MariaDB [mythconverg]> quit
Bye
Then I had to kill the mysqld_safe that was running in the other shell
and restart mysqld (/etc/init.d/mysqld start).
After all this, mythtv can connect again. THANK YOU!!!
Auguetine
More information about the mythtv-users
mailing list