I am creating a new site that is currently maintained, hosted and registered by someone else. Let's say the domain is website.org. The goal is to get the new site functional before transfering the domain to DH. However I am having trouble connecting to the mysql database from the web server.
Following DH KB advice I have created a temporary domain called website.dreamhosters.com and set it to mirror website.org (on DH). A unique IP is also assigned to website.org.
I have created hostnames of:
The database of xxxx_99 is accessible under both hostnames.
I have logged into xxxxx-mysql.website.dreamhosters.com via phpMyAdmin and created the database without issue.
When I try to connect via IP or http://website.dreamhosters.com I get this error:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username'@'harpo.dreamhost.com' (using password: YES) in /home/.quadrangle/username/website.org/top.inc on line 9
Could not connect: Access denied for user 'username'@'harpo.dreamhost.com' (using password: YES)
The username and password work fine in phpMyAdmin, but not from the web server. Yes, I do have %.dreamhost.com set as an allowable host in the user section.
Here is line 9 of code where the supposed error is:
mysql_connect("xxxxx-mysql.website.dreamhosters.com", "username", "password") or
die("Could not connect: " . mysql_error());
Sorry for the long post. Any suggestions?