This works with MariaDB. I assume it works with MySQL, but have not tried it.
Run this SQL in PHPMyAdmin with phpmyadmin selected:
GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost';
FLUSH PRIVILEGES;
Note that this does not grant "ALL PRIVILEGES" as the reference article below does, because it is not necessary.
Reference: https://medium.com/enekochan/fix-configuration-of-pmadb-not-ok-in-phpmyadmin-9340cb604f2d