Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialWill Albertsen
13,155 PointsCannot connect to PHP MyAdmin
I have been having a heck of a time trying to connect to PHP MyAdmin. I get the following error:
Cannot connect: invalid settings. mysqli::real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] mysqli::real_connect(): (HY000/2054): The server requested authentication method unknown to the client Connection for controluser as defined in your configuration failed. mysqli::real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] mysqli::real_connect(): (HY000/2054): The server requested authentication method unknown to the client 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.
I am using XAMPP. I have watched several YouTube videos regarding this problem and have read several threads on Stack Overflow. All of the solutions seemed to fall within either the config.inc file in the PHP myAdmin folder or the 'my.ini' file in the mySQL bin folder. I have tried all of the following:
-Changed 'auth' type to 'http', 'admin' and 'cookie' -Set root password in XAMPP shell and set the same password in config.inc file -Added skip-grant-tables in the my.ini file just above the port number -Entered my mySQL workbench password in the my.ini file.
Nothing works for me.
It may be worth mentioning that in the XAMPP control panel, 'mySQL' is running on port 3307 instead of port 3306. This is because I have mySQL workbench downloaded on my machine and it is running on port 3306. I have noticed that in all of the videos I have watched, they are using port 3306.
Below is the error I get. Can anyone suggest something? Thanks :)
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
Will Albertsen
13,155 PointsWill Albertsen
13,155 PointsUPDATE: I did uninstall mySQL from my machine and now I have access to PHP myAdmin. It seems like I can work with mySQL right in Xampp so I really don't need to have mySQL workbench installed separately on my machine correct?