make sure that you have mysql running before you try to connect to it using PHP. but i dont see a reason why you shouldnt be able to connect to it otherwise.
make sure that PHP is working propperly
make sure that apache is working propperly
make sure that you use mysql_connect() or mysql_pconnect() propperly.
if you can get into your mysql (via .../mysql -h localhost -u "user" -p), you should be able to connect to it using PHP...