phpMyAdmin web gui not loading after changing root password
Posted by: NadJ (---.bb11352.ctm.net)
Date: April 30, 2012 09:57PM

Hi,

I know this is a common one (and it should be given the extremely bad design!)...after changing the mySQL root password from (blank) to something, I am no longer able to get into phpMyAdmin with it telling me that the root password is incorrect. I came across the various articles which advised to edit the phpmyadminX.Y.Z\config.inc.php. So I tried both of the below options editing the files in WordPad.

Option 1:
edit [x]:\wamp\apps\phpmyadminX.Y.Z\config.inc.php
Change
$cfg['Servers'][$i]['user'] = 'root' to your new admin Userid
$cfg['Servers'][$i]['password'] = '' add in your new admin users password between the single quotes.

Option 2:
Makes the browser ask for a valid Userid/password set when you run the phpMyAdmin link and does not need the new userid/password set to be stored in the config file.
edit [x]:\wamp\apps\phpmyadminX.Y.Z\config.inc.php
Change
$cfg['Servers'][$i]['user'] = 'root'; TO $cfg['Servers'][$i]['user'] = '';
leave the ['password'] entry as '';
$cfg['Servers'][$i]['AllowNoPassword'] = true; TO $cfg['Servers'][$i]['AllowNoPassword'] = false;
add this line to make exiting phpMyAdmin return to a clean url instead of giving an error message
$cfg['Servers'][$i]['LogoutURL'] = 'http://localhost/';


I kept on getting the same screen but then suddenly regardless of what is contained in the conf file, when I launch phpMyAdmin, I get the contents of the conf file displayed instead of a webpage! I even tried reverting back to the default one (I copied it earlier) but I get the same thing. All this despite numerous service restarts and server reboots. I get the same thing in Firefox and IE. See screenshot: [s15.postimage.org]

Could anyone advise?
Thanks

Options: ReplyQuote
Re: phpMyAdmin web gui not loading after changing root password
Posted by: NadJ (---.bb11352.ctm.net)
Date: May 01, 2012 04:46AM

An update to say, its now gone back to the access denied screen (of it's own accord and without me doing anything since last night). So, despite the user and password values now both being set to '', I am still not receiving a log on challenge.

How can you design something that does not come up with an authentication challenge out of the box??? it defies everything good old Linux/Unix and open source is renown for!

Options: ReplyQuote
Re: phpMyAdmin web gui not loading after changing root password
Posted by: RiggsFolly (---.as13285.net)
Date: May 02, 2012 05:43PM

DONT USE WORDPAD, If you dont have a decent editor use notepad. Wordpad will add all sorts of document try crud into a file it edits. this could be your problem.

Try pasting this into the config file using notepad, to save you re-installing if you didnt back it up before your change. This is the out of the box settings


<?php

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';


/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';


?>



If you have changed the root password using mysqladmin then you should just have to add the new password to one of config file.
Did you change all the root userids? There are 3 root - 127.0.0.1 / root - localhost / root - ::1
Which did you change? Did you change all 3?
Did you change root - 127.0.0.1 but are trying to login via localhost? Or visa versa??



PS.
I dont work for the supplier of wamp BUT!
MySQL is released from its developers with a super user of 'root' that has no password. I believe just seeing the userid 'root' should tell you where that idea came from!

WAMP attempts to provide the AMP stack in a way that is easy for the Less technical user to install and go. It is not configured for use other than on localhost and limits access to 127.0.0.1 out of the box ( security ).

Options: ReplyQuote
Re: phpMyAdmin web gui not loading after changing root password
Posted by: stevenmartin99 (Moderator)
Date: May 03, 2012 11:41AM

Unusually using word pad to open the config.inc.php is ok

Notepad does an awful job with this one file

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: phpMyAdmin web gui not loading after changing root password
Posted by: RiggsFolly (---.as13285.net)
Date: May 03, 2012 12:05PM

If you want your browser to present a logon challenge i.e. throw a dialog and ask you for userid/password

change these parameters in the config.inc.php file


to

$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

Options: ReplyQuote


Sorry, only registered users may post in this forum.