phpMyAdmin Cannot log in to the MySQL server. and it showing SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
sudo mysql -u root
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';
or
DROP USER root@localhost;
CREATE USER root@localhost IDENTIFIED BY 'root_password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';
FLUSH PRIVILEGES;
sudo service apache2 restart