In newer versions of MySQL (or MariaDB) the ‘root’ user can no longer connect remotely to the database server via PhpMyAdmin (and other such tools). After searching and finding a few backwards and complicated solutions there is actually a simpler way, very simple in fact. In just 3 quick steps.
Connect to the database server as root in a terminal and use the database ‘mysql’:
Change the value of ‘plugin’ for the user ‘root’ in the table called ‘users’ to emtpy:
Flush priveles and you’re good to go:
If you want to go back to disabling root access from anything other than the shell, you can follow the sames steps, but in step 2 change the ‘plugin’ value to “unix_socket”: