12Strings Posted September 27, 2013 Share Posted September 27, 2013 Hi guys . I need to know where this error message is coming from.I've read everything from the promising to maniacal, from thelearned to just plain snotty. I'm not a know it all, I'm justlooking for help, Warning: mysql_connect():Access denied for user 'root'@'localhost'(using password: YES) in C:\xampp\htdocs\home\ Following is my code: <?php // error_reporting(0); error_reporting(E_ALL ^ E_NOTICE); mysql_connect('localhost','root',' '); mysql_select_db('passdb') or die("Unable to select database"); $query="SELECT * FROM 'passtbl' Where point='$point'"; $result=mysql_query($query); $num=mysql_numrows($result); echo date("m/d/Y") . "<br />"; echo "<font size=+2><b> Email info<br /><br />"; echo "<table cellspacing=1 cellpadding=0 border=0> <tr> <TH>point</TH> <TH>target</TH> <TH>username</TH> <TH>password</TH> <TH>emailused</TH> <TH>lastused</TH> <TH>purpose</TH> <TH>saved</TH> <tr> <TH colspan=8>=======================================================================</TH> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['point'] . "</td>"; echo "<td>" . $row['target'] . "</td>"; echo "<td>" . $row['username'] . "</td>"; echo "<td>" . $row['password'] . "</td>"; echo "<td>" . $row['emailused'] . "</td>"; echo "<td>" . $row['lastused'] . "</td>"; echo "<td>" . $row['purpose'] . "</td>"; echo "<td>" . $row['saved'] . "</td>"; echo "</tr>"; echo "</table>"; mysql_close(); } ?> Link to comment https://forums.phpfreaks.com/topic/282465-why-this-error/ Share on other sites More sharing options...
mac_gyver Posted September 27, 2013 Share Posted September 27, 2013 mysql_connect('localhost','root',' '); is your password really a space ^ Link to comment https://forums.phpfreaks.com/topic/282465-why-this-error/#findComment-1451346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.