Problem with password in phpMyAdmin log in window

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem with password in phpMyAdmin log in window

Postby Fantasia_00 » 10. February 2013 04:30

Hello Apache Friends,

I am not an expert at all in computer matters, and even less in XAMPP.

I have installed XAMPP 1.8.1 and have Apache and MySQL running in the XAMPP control panel.

For that, I had to change the ports for Apache and MySQL. I used respectively these solutions:

http://community.apachefriends.org/f/viewtopic.php?p=51971
http://community.apachefriends.org/f/viewtopic.php?f=16&t=52065&hilit=error+2002

The URL then became: http://localhost:8080/

I could then access phpMyAdmin home page directly, without any previous log in page. So, at this point, I did not enter or create any username or password.

Before going any further, I proceeded to create a password because there was a red message at the bottom saying that 'root' user had no password.

I used the XAMPP security tool and the link: http://localhost/security/xamppsecurity.php

After that, when trying to access phpMyAdmin, the log in page appears, but the password does not work. I get this message in the phpMyAdmin log in window:

#2002 Cannot log in to the MySQL server
Connection for controluser as defined in your configuration failed.

Then, I executed the resetroot.bat file... Still same problem...

Now, I do not know what else to do, and I need some help...

Thanks in advance.
Fantasia_00
 
Posts: 15
Joined: 06. February 2013 07:18
XAMPP Version: 5.6.3
Operating System: Windows 7 64-bit

Re: Problem with password in phpMyAdmin log in window

Postby JonB » 11. February 2013 21:46

you may need to adjust the port in config.inc.php

http://wiki.phpmyadmin.net/pma/Config#S ... figuration


Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Problem with password in phpMyAdmin log in window

Postby hackattack142 » 11. February 2013 23:32

Hello,

Assuming the reset bat file did not error out (MySQL needs to be turned off when you run it), you might need to clear your browser cache or force the page to reload.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Problem with password in phpMyAdmin log in window

Postby Fantasia_00 » 13. February 2013 00:35

Hello again,

I am still with no connection to PHP. I cannot get through the password window in phpMyAdmin Welcome Page.

To try to solve this, I followed this procedure:
1. I stopped MySQL (running on port 3307) in the XAMPP control panel.
2. I left Apache running (on ports 4499, 8080) in the XAMPP control panel.
3. I changed this line in the config.inc.php file:
BEFORE $cfg['Servers'][$i]['host'] = '127.0.0.1';

AFTER $cfg['Servers'][$i]['host'] = '127.0.0.1:8080';

4. I deleted the browsing history (except favorites) in browser (Internet Explorer 9).
5. I started MySQL (running on port 3307) in the XAMPP control panel.
6. I clicked on phpMyAdmin under Tools in XAMPP for Windows 1.8.1 home page
http://localhost:8080/xampp/
7. phpMyAdmin Welcome Page opens. Username root appears automatically.
8. I tried different combinations of username / password:
root / blank
root / password found in c:/xampp/security/mysqlrootpasswd.txt *
blank / blank

I still cannot get a connection to PHP in any case.
The command just turns and turns in the background, trying to connect to 127.0.0.1:8080 (I suppose), then stops. The screen never left the phpMyAdmin Welcome Page.
I do not know if it is relevant, but, at the same time, in the XAMPP control panel, the Apache server lost its usual assigned ports (4499, 8080) and displayed instead ports like 51041, 51061 or just a single one 51106.

* Under Security section, in XAMPP for Windows 1.8.1 home page, the status is:
PhpMyAdmin password login is enabled.
In fact, at the beginning of the installation, I tried to create a password for the first time (using http://localhost/security/xamppsecurity.php), and that is when I could not access PHP anymore...

So I still need more help, if possible...

Thanks in advance.
Fantasia_00
 
Posts: 15
Joined: 06. February 2013 07:18
XAMPP Version: 5.6.3
Operating System: Windows 7 64-bit

Re: Problem with password in phpMyAdmin log in window

Postby Fantasia_00 » 13. February 2013 04:09

Hello Apache Friends,

Good news! I finally managed to access to phpMyAdmin...

1. I stopped MySQL (running on port 3307) in the XAMPP control panel.
2. I left Apache running (on ports 4499, 8080) in the XAMPP control panel.
3. I added this line in the config.inc.php file:

$cfg['Servers'][$i]['port'] = '3307';

4. I had already reverted the host line to its original content:

$cfg['Servers'][$i]['host'] = '127.0.0.1';

5. I started MySQL (running on port 3307) in the XAMPP control panel.
6. I clicked on phpMyAdmin under Tools in XAMPP for Windows 1.8.1 home page
http://localhost:8080/xampp/
7. phpMyAdmin Welcome Page opens. Username root is entered automatically.
8. I do not type any password. *
9. I click GO.
10. I am finally in phpMyAdmin application home page!!!

* I tried also the password included in c:/xampp/security/mysqlrootpasswd.txt, but it did not work. I got this error message: Cannot log in to the MySQL server.

So, since it seems that I have a phpMyAdmin connexion, before going any further, in order to avoid any security issues with my password, I would like to get some advice on how to proceed from now on. What are the next steps?

My goal is to ultimately get to work on a local environment with WordPress.

I paste here my current config.inc.php file. I would like to know what I should change there so everything is secure and consistent.


<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
* End of servers configuration
*/

?>


Thanks in advance.
Fantasia_00
 
Posts: 15
Joined: 06. February 2013 07:18
XAMPP Version: 5.6.3
Operating System: Windows 7 64-bit

Re: Problem with password in phpMyAdmin log in window

Postby Altrea » 13. February 2013 04:25

Hi Fantasia_00,

Fantasia_00 wrote:My goal is to ultimately get to work on a local environment with WordPress.

If this is a local environment and you are the only user on that machine you are safe as long as you don't forward your webserver component ports 8080, 4499, 3307 in your router. your router is your protection from the outside.

If i were you i would next create a new database and a new user for wordpress. The user should have limited permissions on just this single database (best practice).

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6745
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Problem with password in phpMyAdmin log in window

Postby Fantasia_00 » 13. February 2013 05:07

Hello Altrea,

Thank you so much for your answer. May I ask a few more questions, just to be sure? (I am very new into all this...)

1. Do I need to set or not a personal username and password to access phpMyAdmin? (What is the best practice?)

2. Do I need to insert or not some generated string for 'blowfish_secret'?

3. Do I need to change or not the 'extension' to mysqli? (It is currently mysql)

4. Please explain your comment (so I do not accidentally do this mistake):
"as long as you don't forward your webserver component ports 8080, 4499, 3307 in your router".

Thanks in advance.
Fantasia_00
 
Posts: 15
Joined: 06. February 2013 07:18
XAMPP Version: 5.6.3
Operating System: Windows 7 64-bit

Re: Problem with password in phpMyAdmin log in window

Postby Altrea » 13. February 2013 17:25

Fantasia_00 wrote:Thank you so much for your answer.

no problemo 8)

Fantasia_00 wrote:May I ask a few more questions, just to be sure? (I am very new into all this...)

Of cause! That's the purpose of this board here :D

Fantasia_00 wrote:1. Do I need to set or not a personal username and password to access phpMyAdmin? (What is the best practice?)

It is best practice to use one user for global database management (creating, changing and deleting databases and database users) with a very secure password.
For each application and database you should create a new user and password. This users should haveas limited as possible permissions on just this single database.

Well, that is best practice for production servers (especially in maybe insecure networks like the internet). On your very own local machine there is not really a security reason to do the same because the security is provided by the fact that your server is not reachable from insecure networks. But because it just costs a minute to create a new user with databse, there is no good reason to don't do that on local development machines too (simply just to accustom you to that behaviour).

Fantasia_00 wrote:2. Do I need to insert or not some generated string for 'blowfish_secret'?

If your local server is not accessible from insecure networks, you don't need to change that secret key

Fantasia_00 wrote:3. Do I need to change or not the 'extension' to mysqli? (It is currently mysql)

Well, you don't need to change that yet, because phpmyadmin works very well with the old mysql functions.
But these old functions will be marked as deprecated with the next minor PHP release 5.5 and will be removed in PHP 5.6 or PHP 6.
Maybe it is not a bad idea to work with the new mysqli functions right now. It is up to you.

Fantasia_00 wrote:4. Please explain your comment (so I do not accidentally do this mistake):
"as long as you don't forward your webserver component ports 8080, 4499, 3307 in your router".

As long as your XAMPP Apache/MySQL is not reachable on your public IP-Address, you will be safe.
I don't know what the standard is for your contries internet service provider. Here in Germany most of the private persons are using an ADSL Router/Modem to connect to the internet.
These routers have firewalls with access rules which protects the pc from unwanted requests coming from the outside. These requests will be blocked by this router and not sended through it to the pc.
But users for example can configure their routers to let for requests pass through for specific ports. Tne requests will be forwarded by the router from the public ip to the pcs private ip.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6745
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Problem with password in phpMyAdmin log in window

Postby Fantasia_00 » 16. February 2013 00:17

Hello Altrea,

Sorry I did not answer earlier... Thank you so much for your very informed advice.

I will implement your suggestions and keep the community posted about my progress.
Fantasia_00
 
Posts: 15
Joined: 06. February 2013 07:18
XAMPP Version: 5.6.3
Operating System: Windows 7 64-bit

Re: Problem with password in phpMyAdmin log in window

Postby Altrea » 16. February 2013 00:18

You are welcome :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6745
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests