PHP and mySQL?

I’m a new DH user…

I can’t seem to get a simple test script to connect to a mySQL database. I get an ‘Access Denied’ error. Can anyone look at my code and tell me what I’m doing wrong?



<?php $dbHost = ""; $dbName = "xxxxx"; $dbUser = "xxxxxx"; $dbPass = "xxxxxx"; $conn = mysql_connect($dbHost, $dbUser, $dbPass); mysql_select_db ($dbName, $conn); $sql = "SELECT * FROM booklist"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { echo $row; } ?>

Are you able to login with that username/password to phpMyAdmin at ?

:cool: Perl / MySQL / HTML CSS

yep. phpMyAdmin works fine, but any attempt to connect via PHP… gets DENIED.