PDO::__construct(): MySQL server has gone away
<?php
try {
$pdo = new PDO('mysql:host=localhost;dbname=u571306', 'root', '', array(PDO::ATTR_PERSISTENT => true));
} catch (PDOException $ev) {
print "Ошибка подключения к БД! <br>" . $ev->getMessage() . "<br>";
die();
}
$pdo = new PDO('mysql:host=localhost;dbname=u571306', 'root', '');