Mysql_connect(): Access denied for user

mysql_connect(): Access denied for user: ‘juanvan@yoda.dreamhost.com’ (Using password: YES) in /home/.fattycat/juanvan/juanvan.net/PHP/index.php on line 6
Access denied for user: ‘juanvan@yoda.dreamhost.com’ (Using password: YES)

I have can log into the database using the main RJK.juanvan.net with the u & p but no in PHP keeps coming up with this error…
Any ideas?
Thanks

If you are running the script from your home computer, then you will need to add your IP/domain to the user you want. Goto Goodies->Mysql, pick user, and at bottom add IP.

Just noticed. A connection string in PHP is

mysql_connect(“db_name.domain.com”, “db_user”, “db_password”);

it looks like you’ve entered the machine name (yoda) instead of the db name… unless yoda is your database name.

That did the trick. Thanks!