Files
updater/db_test_remote.php

21 lines
515 B
PHP

<?php
$options = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION];
$creds = [
['onetake', 'dnjsxpdlzm1!'],
['update', 'asdf0901!'],
['root', ''],
['eventwork', 'eventwork!@#']
];
foreach ($creds as $c) {
echo "Testing {$c[0]}... ";
try {
$dsn = "mysql:host=192.168.100.221;charset=utf8mb4";
$db = new PDO($dsn, $c[0], $c[1], $options);
echo "SUCCESS\n";
exit(0);
} catch (Exception $e) {
echo "FAILED: " . $e->getMessage() . "\n";
}
}
exit(1);
?>