Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 105,764 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,631 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



connection issue

 
Reply to this topicStart new topic

connection issue

nutter
post 7 May, 2008 - 10:07 AM
Post #1


New D.I.C Head

*
Joined: 3 Nov, 2007
Posts: 19


My Contributions


ok,the error is :

CODE

Warning: mysql_query(): Access denied for user 'doanutter'@'xx.xxx.xxx.xxx' (using password: NO) in /home/www/site.com/fuzzy-0.1-beta/core/queries.php on line 3

Warning: mysql_query(): A link to the server could not be established in /home/www/site.com/fuzzy-0.1-beta/core/queries.php on line 3
Access denied for user 'doanutter'@'xx.xxx.xxx.xxx' (using password: NO)

now heres queries.php
CODE

<?php
$tquery = "SELECT * FROM `theme` WHERE 1";
$tresult = mysql_query($nquery) or die(mysql_error());
$them = mysql_fetch_array($nresult) or die(mysql_error());
$theme = "{$them['themenme']}";
?>


and config.php is :
CODE

<?php
$host = "db1.awardspace.com";
$user = "doanutter_cms";
$pass = "******"; //password is *'ed out for obvous resons
$database = "doanutter_cms";
?>


what i dont get is.. in config.php username is doanutter_cms but in the error is doanutter . ?
Can anyone help me fix this problem?

This post has been edited by nutter: 7 May, 2008 - 10:10 AM
User is offlineProfile CardPM

Go to the top of the page


joeyadms
post 7 May, 2008 - 10:13 AM
Post #2


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


Where is the mysql_connect statement at? I believe your apache user maybe doanutter, and you are not issuing the connect statement so it tries localhost with system username.

try in config.php
CODE

$_link = mysql_connect($host,$user,$pass);
mysql_select_db($database,$_link);
User is offlineProfile CardPM

Go to the top of the page

nutter
post 7 May, 2008 - 10:29 AM
Post #3


New D.I.C Head

*
Joined: 3 Nov, 2007
Posts: 19


My Contributions


problem fix thank you
also my querys had n instead of t in

This post has been edited by nutter: 7 May, 2008 - 10:32 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 02:17PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month