title: PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client
body: <p>I'm running MySQL version 8 on PHP 7.0.</p>
  
  <p>I'm getting the following error when I try to connect to my database from PHP:</p>
  
  <blockquote>
    <p>Connect Error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client</p>
  </blockquote>
  
  <p>PHP might show this error</p>
  
  <blockquote>
    <p>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</p>
  </blockquote>
  
  <p>How can I fix this problem?</p>