How to use a shared database from other server


#1

my database in in another server,
my website in Dreamhost, i want it run that database, but i could not
help me please
i tried, for example:
$mysql_database = “visstre”;
$mysql_username = “visstre”;
$mysql_password = “***”;
$mysql_host = “vissonline.com”; ( that from other server)
but website do not run because it look for a database in Dreamhost,
error:

mysql_connect() [function.mysql-connect]: Access denied for user ‘visstre’@‘squirt.dreamhost.com’ (using password: YES) in /home/.julio/blogtre/yeubblog.com/mysqlcon.php on line 7

@‘squirt.dreamhost.com’ that seem be my problem now
anyone help me ??
ofcouse that database is ready set up for sharing to my domain in Dreamhost


#2

vissonline.com is denying you access. The @squirt.dreamhost.com isn’t the problem.

Make sure that vissonline.com is really a database server.

Make sure that vissonline.com allows visstre to connect from the IP address of squirt (208.97.167.25).

-Scott


#3

also dont post here REAL login/pass or some user can hack your BD


BUGabundo :o)
(``-_-´´)
http://BrinKadeiraS.BUGabundo.net
at http://www.dreamhost.com/r.cgi?249195
50$ discount with promo code “BUG50” on ALL plans


#4

Are you sure that $mysql_host = "vissonline.com"; ( that from other server) gives enough information? That’s a tld so you couldn’t have any websites or anything else on that domain if the preceeding line is complete.

I had to use the fully qualified database host name, e.g.: define ('DB_HOST', 'mysql.subdomain.domain.net');


#5

Scott- actually, I don’t think this problem is on the remote server’s side but inside DH. trungtamtuvan, did you ever solve this and if so how?

I am trying to get pages at DH to access a MySQL server hosted at ISP2. From my home web server/dev box the exact same pages as at DH can do this. The mysql user at ISP2 is wild-carded to allow access from any IP address. From within the DH world, however, I get the same error as trungtamtuvan:

Access denied for user ‘username’@‘curly.dreamhost.com’ to database ‘otherDBname’

the phrasing of the error message further makes me think this is a DH environment problem- I see no reason why the ‘@curly.dreamhost.com’ should be entering that error message. If it said it could not connect to ‘username’@‘mysql.isp2.com’ then I would agree it is ISP2, but this smells like a DH issue/policy.

has anyone successfully connected to an outside, remote mysql database from a page hosted in dreamhost?