Jump to content

Stumpted when connecting to database on live site


farban6

Recommended Posts

Having a major problem connecting to a live site. I have set up the user and database on Cpanel like normal. Then proceeded to insert those details into my mysql connection script

 

<?php

$db_link = mysql_connect("***","****","***");
if (!$db_link) {
    die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db('amenshar_calender', $db_link);
if (!$db_selected) {
    die ('Can\'t use database : ' . mysql_error());
}

?>

 

I am connecting to domain erban.co.uk, yet looking at the cpanel the master domain is amensharma.co.uk. Is this what the problem could be. This is the error messege it is throwing up

 

Warning: mysql_connect(): Access denied for user '_admin'@'localhost' (using password: YES) in d:\Domains\erban.co.uk\wwwroot\functions\database.php on line 4

Could not connect: Access denied for user '_admin'@'localhost' (using password: YES)

Link to comment
Share on other sites

Sorry my mistake.

 

 

Warning: mysql_connect(): Access denied for user 'amenshar_admin'@'www2' (using password: YES) in d:\Domains\erban.co.uk\wwwroot\functions\database.php on line 4

Could not connect: Access denied for user 'amenshar_admin'@'www2' (using password: YES)

 

Yeah its still in the middle of testing :P

 

Is there anything details needed to help solve this problem?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.