【发布时间】:2019-10-30 10:39:12
【问题描述】:
我是编程新手,我正在尝试使用 PHP 和 MYSQL 制作简单的注册/登录表单。但是当我打开网站时,有一个标志说
警告:mysqli_connect():服务器请求的身份验证方法未知客户端 [caching_sha2_password] 在 D:\xampp\htdocs\reg\server.php 第 10 行
警告:mysqli_connect(): (HY000/2054): The server requested authentication method unknown to the client in D:\xampp\htdocs\reg\server.php on line 10 登录
实际上我已经在谷歌上搜索过答案,但没有任何效果。这是来自错误的代码的第 10 行
// connect to the database
$db = mysqli_connect('localhost', 'username', 'password', 'registration');
【问题讨论】: