public function connect(Info $info): PDO {
    try {
      $mysql = new PDO("{$info->getDsn()}:host={$info->getHost()};dbname={$info->getDbname()};port={$info->getPort()};charset={$info->getCharset()}", $info->getUser(), $info->getPassword(), array(
        PDO::ATTR_AUTOCOMMIT => false,
        PDO::ATTR_PERSISTENT => false,
        PDO::ATTR_EMULATE_PREPARES => true,
        PDO::ATTR_TIMEOUT => 1800,
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
        PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,
        PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES {$info->getCharset()}"
      ));
    } catch (Exception $ex) {
      $mysql = null;
      throw $ex;
    }
    return $mysql;
  }