php mysql为啥显示乱码,utf-8 utf8-bin都设置了还是不行

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
</head>

<body>
<?php
    $servername = "localhost";
    $username = "root";
    $password = "";
    $dbname = "myblog";
        $con = mysqli_connect($servername, $username, $password, $dbname);
     if(!$con)
         {
            echo"failed connect to database";
        }else
        {
            echo"succeed connect to database";
            echo"</br>";
            $sql = "SELECT id,title,author,content,date FROM article";
            $result = mysqli_query($con,$sql);
            while($row = mysqli_fetch_array($result))
            {
            echo "id    ==>";
            echo $row[0];
            echo "</br>";
            
            echo "题目  ==>";
            echo $row[1];
            echo "</br>";
            
            echo "作者  ==>";
            echo $row[2];
            echo "</br>";
            
            echo "内容  ==>";
            echo $row[3];
            echo "</br>";
            
            echo "日期  ==>";
            echo $row[4];
            echo "</br>";
            }
            mysqli_close($con);

        }
         ?>
</body>
</html>

php代码设置了utf-8,mysql utf8-bin都设置了可是网页显示出来的依然是乱码

请大神指教

在连接上数据库后,设置一下查询的编码: