I'm new to programming and I'm trying to make simple register/login form using PHP and MYSQL. But when I open the website there is a sign saying
Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in D:\xampp\htdocs\reg\server.php on line 10
Warning: mysqli_connect(): (HY000/2054): The server requested authentication method unknown to the client in D:\xampp\htdocs\reg\server.php on line 10 Login
Actually I've searched for answers on google but nothing works. Here's the 10th line from the code which comes the error from
// connect to the database
$db = mysqli_connect('localhost', 'username', 'password', 'registration');