phpMyAdmin Password
Posted by: ToddASchroeder (156.99.18.---)
Date: April 06, 2015 08:20PM

When I open up phpMyAdmin it is suggested that I create a password. I also have a PHP / MySQL Book that also recommends setting a password and username to prevent intrusion.

While using phpMyAdmin I created a password. When I attempt to access phpMyAdmin I now get this error message "phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username, and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server".

When I use the MySQL Console I get access by using the password I just created.

I have researched the internet and it seems that I need to change some setting in my config.inc.php file. I have found this file but am unsure of what to change.

Can anyone help me?

Options: ReplyQuote
Re: phpMyAdmin Password
Posted by: RiggsFolly (---.as43234.net)
Date: April 07, 2015 10:33AM

My suggestion is to change this section of the \wamp\apps\phpmyadminx.y.z\config.inc.php file to this


/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//$cfg['Servers'][$i]['auth_type'] = 'config';
//$cfg['Servers'][$i]['user'] = 'root';
//$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

This will tell phpMyAdmin to throw a login dialog when you run it. Its more secure that adding the password to the config file as most tutorials suggest.

You then just enter the username and password in the dialog fields.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: phpMyAdmin Password
Posted by: ToddASchroeder (156.99.18.---)
Date: April 07, 2015 10:51PM

I tried your suggestion and restarted my computer. It did not work.

I changed the password to the one I created earlier inside of phpMyAdmin and restarted my computer. It did not work.

I uninstalled WAMP and reinstalled WAMP and now everything is reset.

Thank you for your suggestions.

Out of curiosity what is the correct procedure with changing the config.inc.php file once you create a username and password inside of phpMyAdmin?

Options: ReplyQuote
Re: phpMyAdmin Password
Posted by: RiggsFolly (---.as43234.net)
Date: April 08, 2015 01:08AM

The correct solution is to change the config.inc.php file as I suggested. That is the config I use and it works.

If that does not work then something else is getting in the way, maybe a second MySQL instance on your PC.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.