I have a current site that uses an SQL database, and I would like to make another site that connected to this same database, I enter the IP of where the database is, but it still wont function
$mysql_host = "66.45.23x.xx";
Of course the x's are numbers
when it gets to my site it shows this
 dbconn: mysql_connect: Access denied for user: 'firstname.lastname@example.org' (Using password: YES)
osaka.clanch.net is the current server, i dont know why its doing that when i set it to 66.45.23x.xx
I believe most webhosts do not allow for remote connection to their databases. This would mean that all queries inbound from anywhere else then their own server would be denied.
However, it might be that someone else has a solution to this.
I share a database between 2 sites. We use the domain name instead of localhost to connect though and it works fine.
I did have to add the non-local host to an ok list of Access Hosts before it would work. That was done through the MySQL part of the cPanel. Maybe you have to do something similar?
Claymore is spot on. Make sure remote connections are allowed before trying to conect remotely.