JoeH Posted June 20, 2018 Share Posted June 20, 2018 I am running MySQL 8.011 and PHP 7.2.6 on Fedora 28 Linux. I tried PHP to connect to the server with the usual command: $conn = @mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die('Could not connect to MySQL: ' . mysqli_connect_error() ); and got the error message: "Could not connect to MySQL: The server requested authentication method unknown to the client" The values of DB_HOST, etc are correct and they work when I connect to the server from the command line. I tried changing default-authentication-plugin to mysql_native_password in my.cnf and restarting the server but I got the same error message. Your help will be much appreciated. Link to comment Share on other sites More sharing options...
Larry Posted June 21, 2018 Share Posted June 21, 2018 Oof. That's a new one to me (in this version of MySQL). The current solution seems to be to pretend it's an earlier version of MySQL by setting the environment: https://github.com/laradock/laradock/issues/1392 Link to comment Share on other sites More sharing options...
Recommended Posts