MariaDB - can log in via the command line but not through app like TablePlus
For MariaDB older than 10.4 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewPassword'); FLUSH PRIVILEGES; then SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewPassword'); FLUSH PRIVILEGES;

For MariaDB older than 10.4
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewPassword');
FLUSH PRIVILEGES;
then
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('NewPassword');
FLUSH PRIVILEGES;