Preface
I've had this before.
I take it you know the risks of enabling passwordless root login to the database; also in order for this to work you'll have to store root's password in a file in plain text. If you have a sane configuration no webserver user will be able to read the file, but the file by default is readable by everyone in the system. Keep that in mind.
Solution
Edit /etc/phpmyadmin/config.inc.php
with whatever editor as root; there will be two /* Authentication type */
lines each followed by a //$cfg['Servers'][$i]['auth_type'] = 'cookie';
line; you'll have to edit one of the two //$cfg['Servers'][$i]['auth_type'] = 'cookie';
according to how you installed PHPMyAdmin:
- If you configured PHPMyAdmin with
dbconfig-common
, pick the first one (the one inside the if (!empty($dbname)) {}
block);
- If you didn't configure PHPMyAdmin with
dbconfig-common
, pick the second one (the one outside any block);
Replace the approriate line with the following:
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['username'] = 'root';
$cfg['Servers'][$i]['password'] = 'password'; // Replace password with the actual root password
That's it. From now on every time you'll visit PHPMyAdmin's index page you'll be automatically logged in as root.
Notes
As for why Windows 10 and Ubuntu 15.10 behave differently, they're simply not meant to behave the same way. It could be simply that they come configured differently by default, however if I recall correctly PHPMyAdmin used to come configured as in Windows in previous versions (many versions ago, but don't take this for granted). They're simply not meant to be configured the same way and they don't.
The package distributed on Ubuntu as always could have been subjected to modifications upstream: the way a package comes configured is always up to the package's mantainer, and does have to match no Windows configuration.