Hello;
I am trying to connect to my MySQL database, however I keep getting an error saying Unable to Connect.
This is the script which I need to change the database connection details on. I’ve tried updating the database password, I was able to do it once, but now when I go to change it, it remains the same, or I think it does - I am unable to access PHPMyAdmin - and the password for everything else has remained the same.:
<?php
// MySQL Settings
define("DB_HOST", "sql313.epizy.com");
define("DB_USER", "epiz_23051073");
define("DB_PASS", "[databasepassword]");
define("DB_NAME", "epiz_23051073_hybrid_v1");
require('functions.php');
// Do Not Edit Below --- SERIOUSLY DON'T TOUCH THIS STUFF.
$pdoOptions = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT,
PDO::ATTR_EMULATE_PREPARES => false
);
try {
$pdo = new PDO(
"mysql:host=" . DB_HOST . ";dbname=" . DB_NAME,
DB_USER,
DB_PASS,
$pdoOptions
);
} catch (Exception $e) {
throwError('Unable to connect to database.', true);
die('Unable to connect to database.');
}
Found this in the Knowledge Base.
Please use the Knowledge Base first before posting questions.
Just making sure, since 9/10 times people have no idea that the Knowledge Base exists or how to use it.
Maybe you will throwError with the error, not just const text?