<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

$host = 'localhost';             // try '127.0.0.1' if needed
$user = 'alldemosite_toympartner';
$pass = 'REPLACE_WITH_YOUR_PASSWORD';
$db   = 'alldemosite_toympartner';

echo "<p>Connecting to MySQL…</p>";
$mysqli = @new mysqli($host, $user, $pass);

if ($mysqli->connect_errno) {
  die("<strong>Connect error:</strong> {$mysqli->connect_errno} - {$mysqli->connect_error}");
}

echo "<p>Connected. Selecting DB…</p>";
if (!$mysqli->select_db($db)) {
  die("<strong>Select DB failed:</strong> " . $mysqli->error);
}

echo "<p><strong>OK:</strong> Connected and DB selected.</p>";
