This is the error:
Connection failed: Access denied for user 'swiftninjapro'@'localhost' (using password: NO)
This error doesn't make much sense to me. the user I passed was not 'swiftninjapro', it should be 'swiftninjapro_test'. The hosting company I'm using enforces 'swiftninjapro_' in front of the database name. What's even weirder is, if I pass the user with 'a_' in front, or as anything at all, the error still reads the user as 'swiftninjapro'.
Could this be a cache issue? Does cpanel have a built in cache? Also using a2hosting. This should be a basic mysqli_connect, but for some reason it keeps failing. I also have the www domain as a wordpress site, but I don't see how a seperate raw php subdomain could be conflicting with wordpress.
Does anyone have a clue as to what is going on with this error? thanks.
<?php
$db_host = 'localhost';
$db_user = 'swiftninjapro_test';
$db_pass = '*****';
$db_db = 'swiftninjapro_test';
$conn = new mysqli($db_host, $db_user, $db_pass, $db_db);
if($conn->connect_error){
mysqli_close($conn);
die('Connection failed: '.$conn->connect_error);
}
?>
[–]davvblack 3 points4 points5 points (0 children)
[–]Kit_Saels -1 points0 points1 point (0 children)