I am running php 7.3. On running the following code:
$conn = mysqli_connect($servername, $username, $hashed_password);
if(!$conn){
die("Connection failed: " . mysqli_connect_error());
}
I am getting output as:
Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in C:\localhost\mysql.php on line x
Warning: mysqli_connect(): (HY000/2054): The server requested authentication method unknown to the client in C:\localhost\mysql.php on line x
Connection failed: The server requested authentication method unknown to the client.
fix?