Unstoppable Domains

PhP error in site

Spaceship Spaceship
Watch

Falian

Established Member
Impact
2
I get this when i try to connect to my site

Warning: mysql_connect(): Access denied for user: 'nobody@localhost' (Using password: NO) in /home/boom3/public_html/includes/connect.inc.php on line 12
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
the user you specified is not priveleged to use the database and/or you forgot the username_ before your actual db username and db password. solution: give the user access to the database you assigned to it and name your dbname/dbusername with this cpanelusername_databasename and cpanelusername_databaseusername
 
0
•••
Hehe Weblord Ive been saying this alot recently.
 
0
•••
yes as weblord suggests it does in favct look like you have not used a username and password at all in the script so it is not using any values at all when connecting (hence why it shows as nobody@localhost)
 
0
•••
This code may help just replace the values in caps.
PHP:
<?php
$user = "USER_DBUSERNAME";
$password = "PASSWORD";
$databasename = "USER_DATABASENAME";
$location = "localhost" //You would usually leave this as it is default 99% of the time.
mysql_connect("$location", "$user", $password");
mysql_select_db("$databasename");
?>

Hope this helps, if it does i like rep.
 
0
•••
Thanks everyone, you all seem very proficient in PhP. I have a very big project that i will need to hire one of you to help me on.
 
0
•••
Ok, Thanks, I have sent you a private message regiarding this, did you get it done?
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back