The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

542350 (6) [Avatar] Offline
#1
I am getting some errors when starting my Wordpress container:

Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22

Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22

MySQL Connection Error: (2054) The server requested authentication method unknown to the client

Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22

Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22

MySQL Connection Error: (2054) The server requested authentication method unknown to the client


I am pausing and checking the logs in the mysql container to make sure that it is ready. The Wordpress container shuts down after about 15 seconds or so when it sees it can't connect. I am not sure what to do next. Any help would be appreciated.
542350 (6) [Avatar] Offline
#2
I have found a solution. After looking through Google I found a Github issue with the same error relating to laradock. They fixed it by getting the MySQL version to 5.6. Please, author, tag your releases when writing. I bought the second edition to see if this error was fixed and it has not been. The commands should be:

sudo docker run --name wp-mysql -e MYSQL_ROOT_PASSWORD=yoursecretpassword -d mysql:5.7


sudo docker run --name wordpress --link wp-mysql:mysql -p 10003:80 -d wordpress


This has been a great and fun resource so far but I guess I haven't gotten to see the new changes yet in the second edition. Understandable as I'm so early in the book but I think things like this should be tested and corrected before releasing out of MEAP. If it's possible to get this to work with the latest version of MySQL (or switch to MariaDB if you can) that would also be great.