Warning: mysqli_connect(): Error while reading greeting packet. PID=12324 in D:\Web\mdapei\read.php on line 8

Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in D:\Web\mdapei\read.php on line 8

Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, bool given in D:\Web\mdapei\read.php:10 Stack trace: #0 D:\Web\mdapei\read.php(10): mysqli_query(false, 'SET CHARACTER S...') #1 {main} thrown in D:\Web\mdapei\read.php on line 10