Link to home
Start Free TrialLog in
Avatar of BBRRGG
BBRRGG

asked on

What is my password for "Connect to localhost" prompt?

Recently installed php, Apache, mySQL, phpMyAdmin on my Windows XP machine.  When I bring up localhost:8080/index.php, I get a prompt that looks similar to a Windows prompt, that says the following:
"The server localhost at phpMyAdmin localhost:8080 requires a username and password.
Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentication without a secure connection)."
 
config.inc.php had following lines by default:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost:8080';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';

From reading online forumns, I've changed 'cookie' to 'http', and added the following lines:
$cfg['Servers'][$i]['user'] = 'MyLastName';
$cfg['Servers'][$i]['password'] = 'MyPassword'; // which is the same as my mySQL password

When I visit http://localhost:8080/index.php, it used to first take me to the phpmyadmin login web page, then after I entered something here, it would take me to the Windows-looking prompt described above.  Now (I think since I made the changes above), it takes me directly to the prompt (not seeing the phpMyadmin login webpage anymore).  

Thanks for any suggestions!
Avatar of MMDeveloper
MMDeveloper
Flag of United States of America image

see if there is a .htaccess file in that directory
Avatar of Maciej S
It should be your username/password to your MySQL database.
'cookie' auth_type is for phpMyAdmin's own login page. You switched it to http, which is your web server's type of authentication. I don't use phpmyadmin/apache on windows, but on unix, I have auth_type set to cookie, and I don't have any problems with loging to my databases via phpMyAdmin. However, it should work with your database's username/password no matter if you have cookie or http option.

Second thing is - you have set your host option to localhost:8080. This should be set to you database host without port. If your mysql is on the sasme computer, it should be just localhost (or 127.0.0.1).
Avatar of siriusgroup
siriusgroup

You may find that your installation has a default user root and a blank password initially. If that is the case use that to get in then change it.
Avatar of BBRRGG

ASKER

Thank you for the messages.  I just now returned home from work to my localserver:8080.

1.  Yes there is a .htaccess file in C:\Program Files\phpMyadmin\libraries and in C:\Program Files\Apache Software Foundation \ Apache 2.2 \ htdocs \ libraries
(htdocs is root directory)

2.  When I set up MySQL through the wizard, I was only prompted for my email address and a password (no user name).  The reason I set it to localhost:8080 was because port 80 was not listening (occupied by another program??)  I'm not too familiar with the port system, but the tutorial book I was reading seemed to imply that localhost:8080 was just as good.  When my phpinfo() script worked, I figured localhost:8080 was fine (as opposed to just localhost).  If you see other reasons why it might be bad, please feel free to share.

3.  Entering "root" for user and leaving password blank does not seem to work.  When I enter the username and password I created in config.inc.php, the browser says "Connecting" for a long time and then finally HTTP 500 Internal Server Error.  It may be timing out.

Thanks for any further suggestions you can offer!
ASKER CERTIFIED SOLUTION
Avatar of Maciej S
Maciej S
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BBRRGG

ASKER

Great!  Changed localhost:8080 to localhost on config.inc.  Then logged in using 'root' and mySQL password.  Thanks!