PHP and mySQL?

software development

#1

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?

thanks.

code:

<?php $dbHost = "mysql.mollet.moonpatrol.com"; $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; } ?>

#2

Are you able to login with that username/password to phpMyAdmin at http://mysql.mollet.moonpatrol.com/ ?

:cool: Perl / MySQL / HTML CSS


#3

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