runnerjp Posted November 13, 2006 Share Posted November 13, 2006 hey guysok i have set up a shoutbox and a marquee to scroll the text that has been input but it says their is an error but i cant work out why can any one help me ??this is my connection script[code]<?php#################################include("admin/connect.php");#################################mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT name, message FROM dwg_tag order by id DESC LIMIT 10";$result = mysql_query($query);$marquee = "";$i = 0;while($r=mysql_fetch_array($result)){ $posts[$i] = $r[name].' - '. $r[message]. ' '; ++$i;}$marquee = implode("<img src='http://www.runnerselite.com/image/RUNNERSMALL.jpg'>", $posts);echo "<marquee scrolldelay='110'><font size='3'><span style='color: white'>". $marquee. "</span></font></marquee>"?>[/code]and this is my connection script[code]<?php$host = "localhost";$user = "";$pass = "";$db = "";$number = "";$link = mysql_connect("$host", "$user", "$pass");$dawg_tag = "dawg_tag{$number}";$dawg_tag_set = "dawg_tag_set{$number}";$dawg_tag_block = "dawg_tag_block{$number}";$servertime = time();[/code]i cant see the problem :Serror says Warning: mysql_connect(): Access denied for user 'nobody'@'localhost' (using password: NO) in /home/runnerse/public_html/tag/maq.php on line 6 Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted November 13, 2006 Share Posted November 13, 2006 Looks like the username/password combo you're using is not correct. Or you do not have the correct permissions set-up for the 'nobody' user for connecting to MySQL. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 13, 2006 Author Share Posted November 13, 2006 but it must work as you can access the tag box itself ???is their a problem with my marquee script ?? Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 13, 2006 Author Share Posted November 13, 2006 ok i have used scripts before and have not had this problem meanin the promision should be ok?? Quote Link to comment Share on other sites More sharing options...
SharkBait Posted November 13, 2006 Share Posted November 13, 2006 But the error its telling you is that it cannot connect to the database. The (user password: NO) means that the 'nobody'@'localhost' account does not need a password.Does 'nobody' exist in the priveleges for the database? Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 13, 2006 Author Share Posted November 13, 2006 no it does not...i want it to connect to my username and password with the database if that makes sence Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 13, 2006 Author Share Posted November 13, 2006 [code]mysql_connect("$host","$dbuser","$dbpass") or die(mysql_error());// Select the database.mysql_select_db($dbname) or die(mysql_error());$query = "SELECT name, message FROM dawg_tag order by id DESC LIMIT 10";$result = mysql_query($query);$marquee = "";$i = 0;while($r=mysql_fetch_array($result))[/code]is this wrong atall because i dont understand how my tagboard itself can connect to my database but when i try accessing it with mysql it says the passwords and user is wrong even tho im useing the same connect.php :S Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 14, 2006 Author Share Posted November 14, 2006 any one here today who can help?? Quote Link to comment Share on other sites More sharing options...
SharkBait Posted November 14, 2006 Share Posted November 14, 2006 Do you have access to the server itself?At a command prompt type: mysql -u yourusername If it lets you in then you know your username and you don't need a password to get in. :) Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 14, 2006 Author Share Posted November 14, 2006 got that 1 sorted now thanks m8 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.