impossible to connect to phpmyadmin

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

impossible to connect to phpmyadmin

Postby nickg001 » 09. October 2023 19:43

Hello
in phpmyadmin I wanted to change the password BD and I got an error and now impossible to connect to phpMyAdmin
I use XAMPP 3.3.0

error
MySQL replied: Documentation
Unable to connect: incorrect settings.
mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)
phpMyAdmin attempted to connect to the MySQL server, and the server rejected the connection. Please check the values of host, username and password in the configuration and ensure that they match the information provided by the MySQL server administrator.

thank you for help
nickg001
 
Posts: 3
Joined: 09. October 2023 19:38
XAMPP version: 3.3.0
Operating System: windows10

Re: impossible to connect to phpmyadmin

Postby Nobbie » 09. October 2023 20:04

After you changed root password in PhpMyAdmin, you should logout and then edit config.inc.php in phpmyadmin folder.

Change the password of "root" in PhpMyAdmin and apply the same password as you did in PhpMyAdmin. Look for these lines in config.inc.php:

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';


Finally apply your new password to the "password" field (example below):

Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mynewpassword';


Alternatively you may change the auth_type from 'config' to 'cookie'. If you do so, PhpMyAdmin will prompt you for a User and a Password. Provide "root" and your new password. In that case, the setting of the "password" option in config.inc.php is ignored, instead you have to apply the password in the upcoming dialog.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: impossible to connect to phpmyadmin

Postby nickg001 » 10. October 2023 13:05

well now I do not remember the password :(

my screen of phpmyadmin = access denied
nickg001
 
Posts: 3
Joined: 09. October 2023 19:38
XAMPP version: 3.3.0
Operating System: windows10

Re: impossible to connect to phpmyadmin

Postby Nobbie » 10. October 2023 18:19

nickg001 wrote:well now I do not remember the password :(


I dont know it either....

Its a very bad idea to change root password and finally forget it. Google for "reset root password in xampp", there should be some tutorials out there how to reset the password. If you cannot fix it, there is no other option than a completely new install (which also means a loss of all data - did you do backups?).
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: impossible to connect to phpmyadmin

Postby nickg001 » 10. October 2023 19:05

I found the solution with hours of research. I recreated a password with the terminal. Not easy because I don't know the mysql language well.
But now I can't transfer my local site to my host. I cannot connect my database to my host. I have a connection error, even though my connection information is correct.
nickg001
 
Posts: 3
Joined: 09. October 2023 19:38
XAMPP version: 3.3.0
Operating System: windows10

Re: impossible to connect to phpmyadmin

Postby Nobbie » 11. October 2023 20:03

As long as we dont know anything, as long nobody can help you.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 150 guests