Are you able to execute following still?
mysql -e "SELECT User,Password, Host FROM mysql.user;"
BTW: some interesting point might help to get your root user back to the original status Authentication from MariaDB 10.4 - MariaDB Knowledge Base
Password should be set to invalid
as this will disable password login. The localhost authentication is working via unix_socket
.
This is how it looks on my demo system actually.
root@DietPiOPi5:~# mysql -e "SELECT User,Password, Host FROM mysql.user;"
+-------------+-------------------------------------------+-----------+
| User | Password | Host |
+-------------+-------------------------------------------+-----------+
| mariadb.sys | | localhost |
| root | invalid | localhost |
| mysql | invalid | localhost |
| phpmyadmin | *D3DC6A67722AED2FC0750B52B5A42790ACF47ED0 | localhost |
+-------------+-------------------------------------------+-----------+
root@DietPiOPi5:~#
root@DietPiOPi5:~# mysql -e "SHOW GRANTS FOR 'root'@'localhost';"
+-----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+-----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket WITH GRANT OPTION |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------------------------------+
root@DietPiOPi5:~#