-1

I tried to install a phpmyadmin in laravel valet. after i run

brew install phpmyadmin I run valet link and visit the phpmyadmin in the browser by typing phpmyadmin.test

I assume that the default username and password would be 'root' and blank

but when i try to login i encounter this error

screenshot: https://prnt.sc/lva5yu

mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
Aria Radmand
  • 323
  • 2
  • 8
  • may be duplicate question see https://stackoverflow.com/questions/49948350/phpmyadmin-on-mysql-8-0 – Jignesh Joisar Dec 15 '18 at 13:13
  • 2
    If you are on Mac forget phpmyadmin and download proper client like Sequel Pro. Good luck! – Kyslik Dec 15 '18 at 16:09
  • 1
    @Kyslik i fixed the issue by uninstalling the mysql 8 to mysql 5.7. now i can connect my phpmyadmin or sequel pro to database – Sheerwood John Caday Dec 17 '18 at 22:54
  • Excellent :) I did exactly same thing because brew installs MySQL 8 by default. – Kyslik Dec 18 '18 at 11:28
  • Solution is not uninstall or downgrade. Solution is know problem and get solution for problem. Mysql 8 is new and there'e a few questions about security that affecting phpmyadmin. https://stackoverflow.com/questions/49948350/phpmyadmin-on-mysql-8-0 other – abkrim Dec 22 '18 at 17:13

1 Answers1

-2

If you want to use MySQL 8.0 and not get the "caching_sha2_password plugin" error, then check out a couple blog posts I wrote on how to setup MySQL 8.0 in Docker with persistent data, as well as a post on how to run your MySQL 8.0 container with mysql_native_password.

In short, you can create a local "my.cnf" config file:

$ sudo nano /usr/local/opt/mysql/config/my.cnf

Add the necessary config statement to it:

[mysqld] default-authentication-plugin=mysql_native_password

And then include that file as a volume bind in your "docker run" statement:

$ docker run --restart always --name mysql8.0 -v/usr/local/opt/mysql/8.0:/var/lib/mysql -v /usr/local/opt/mysql/config:/etc/mysql/conf.d -p 3306:3306 -d -e MYSQL_ROOT_PASSWORD=your_password mysql:8.0

You can read more detail on these steps here:

https://medium.com/@crmcmullen/how-to-run-mysql-in-a-docker-container-on-macos-with-persistent-local-data-58b89aec496a

https://medium.com/@crmcmullen/how-to-run-mysql-8-0-with-native-password-authentication-502de5bac661