How to Disable Root Logins in phpmyadmin with Ubuntu

Edit – April 29, 2011 – This is no longer working for me in Ubuntu 10.04 with everything updated. If you can figure it out, please drop a comment!

This took me a bit too long to figure out. Using Ubuntu 8.10 on a server, I wanted to use phpmyadmin to graphically manage my MySQL databases, but disallow root logins for security reasons.

There are two things you must do in the phpmyadmin config file – typically found at /etc/phpmyadmin/config.inc.php:

  1. Change the ‘auth_type’ to ‘cookie’. This will be under the /* Authentication type */ comment. The line should read as

    $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;

    Make sure it is uncommented by removing the “//” before it, and then change the parameter to ‘cookie’ if that’s not already set.

  2. Add a new line below this, that says

    $cfg[‘Servers’][$i][‘AllowRoot’] = FALSE;

That’s it! Very easy but was tough to find in the forums.

Happy administrating!

Posted in by Berto.

11 Responses to "How to Disable Root Logins in phpmyadmin with Ubuntu"

Leave a Reply

Your email address will not be published. Required fields are marked *


*