castmitigation
05-20-2008, 03:56 PM
Hi guys, Im having a problem here so far I havent been able to solve at all.
- I created a user name "myuser" for "my_database"
- I gave this user all the permissions to this database so its administrator.
- Im trying to connect to the database and all I recieve is access denied
this is my code
$username = "user";
$password = "psw";
$database = "mysite_db";
$hostname = $_SERVER['HTTP_HOST'];
$dbh = mysqli_connect($hostname, $username, $password, $database);
can somebody tell me which might be the reason?
I noticed that everytime i create a user in cpanel it automaticly appends "mysite_" to every user i create so all the users look like "mysite_username". Ive tried both and nothing so this is not the problem either i guess.
thanks in advance.
- I created a user name "myuser" for "my_database"
- I gave this user all the permissions to this database so its administrator.
- Im trying to connect to the database and all I recieve is access denied
this is my code
$username = "user";
$password = "psw";
$database = "mysite_db";
$hostname = $_SERVER['HTTP_HOST'];
$dbh = mysqli_connect($hostname, $username, $password, $database);
can somebody tell me which might be the reason?
I noticed that everytime i create a user in cpanel it automaticly appends "mysite_" to every user i create so all the users look like "mysite_username". Ive tried both and nothing so this is not the problem either i guess.
thanks in advance.