There are 2 errors:
1. Connection for controluser as defined in your configuration failed
Solution:
a. Open terminal:
sudo gedit /etc/phpmyadmin/config.inc.php
b. and uncomment following lines(may be both will come 2 times depend upon version):
$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
c. and comment following lines(may be both will come 2 times depend upon version):
//$cfg['Servers'][$i]['controluser'] = $dbuser;
//$cfg['Servers'][$i]['controlpass'] = $dbpass;
2. Access denied for user 'root'@'localhost'
This will come when you open phpmyadmin or when you open mysql on terminal with out sudo command(not from root user). This error is due to root user. The reson behind this error is your current ubuntu user does not have previlages to open mysql in terminal. If you open mysql with sudo command then it will open but not open from your current user. For example:
lenovo@lenovo-ThinkPad-E460:/etc$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Here current ubuntu user is lenovo. So you have to give permissions to your root user.
Process:
1 - First, connect in sudo mysql
sudo mysql -u root
2 - Check your accounts present in your db
SELECT User,Host FROM mysql.user;
+------------------+-----------+
| User | Host |
+------------------+-----------+
| admin | localhost |
| debian-sys-maint | localhost |
| magento_user | localhost |
| mysql.sys | localhost |
| root | localhost |
3 - Delete current root@localhost account
mysql> DROP USER 'root'@'localhost';
Query OK, 0 rows affected (0,00 sec)
4 - Recreate your user
mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';
Query OK, 0 rows affected (0,00 sec)
5 - Give permissions to your user and don't forget to flush privileges
mysql> GRANT ALL PRIVILEGES ON . TO 'root'@'%';
Query OK, 0 rows affected (0,00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,01 sec)
6 - Exit mysql and try to reconnect without sudo
I hope this will help. And now you able to open phpmyadmin with no password.