データベースの接続を確認する

<?php

try {
    echo 'dbname=chz1151003_wp' . "<br>";
    $db1 = new PDO('mysql:host=hogehoge_host;port=hogehoge_port;dbname=hogehgoe_wp', 'hogehoge_id', 'hogehgoe_pass');

    echo 'success.' . "<br>";
} catch (\Exception $ex) {
    echo $ex->getMessage();
}

echo "<br>";

try {
    echo 'dbname=chz1151002_wp' . "<br>";
    $db1 = new PDO('mysql:host=testtest_host;port=testtest_port;dbname=testtest_wp', 'testtest_id', 'testtest_pass');

    echo 'success.' . "<br>";
} catch (\Exception $ex) {
    echo $ex->getMessage();
}

exit;