02-06-2019, 10:47 AM
I’m having problems with mysql during installation in two different environments.
I have two environments with the same problem:
a) “native” on MacOS. PHP 7+, Apache, Mysql 8.0.14, etc., and
b) MAMP PRO install.
The failure message is: Error!: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
This seems to be the section of code where it is failing.
install/setup-config.php
// We'll fail here if the values are no good.
$dsn = "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME . ";charset=utf8";
try {
$pdo = new PDO($dsn, DB_USER, DB_PASS);
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
I’m lost at this point. I’d be surprised if it is an issue with the old/new password algorithms
used by mysql, but who knows.
Any help would be greatly appreciated !
John
I have two environments with the same problem:
a) “native” on MacOS. PHP 7+, Apache, Mysql 8.0.14, etc., and
b) MAMP PRO install.
The failure message is: Error!: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
This seems to be the section of code where it is failing.
install/setup-config.php
// We'll fail here if the values are no good.
$dsn = "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME . ";charset=utf8";
try {
$pdo = new PDO($dsn, DB_USER, DB_PASS);
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
I’m lost at this point. I’d be surprised if it is an issue with the old/new password algorithms
used by mysql, but who knows.
Any help would be greatly appreciated !
John