public static function sslConnect($host, $user, $password, $name, $key, $cert, $ca)
    {
        if ($key == "" || $cert == "" || $ca == "") {
            throw new MysqlUtilsException("SSL parameters error");
        }

        $mysqliRef = mysqli_init();
        $mysqliRef->ssl_set($key, $cert, $ca, null, null);

        $connected = @$mysqliRef->real_connect($host,
            $user,
            $password,
            $name,
            3306,
            null,
            MYSQLI_CLIENT_SSL);

        if (!$connected || $mysqliRef->connect_error) {
            throw new MysqlUtilsException('Database connection error ('.$mysqliRef->connect_errno.') '.$mysqliRef->connect_error);
        }

        return $mysqliRef;
    }