Forum Moderators: coopster

Message Too Old, No Replies

mysql connect to another domain

         

flashman

7:30 am on Aug 23, 2003 (gmt 0)

10+ Year Member



i have admin file using it i change some text on site every day. But i need that text will appear on other 3 websites at the same time. I tried connect to mysql databases on another sites but i can't.

My connect string on server likes it:
localhost
user
password

but i can't connect using such way:
www.webdomen.com
user password

Is there another way to do it?

jatar_k

6:41 pm on Aug 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it must be the server string, are you sure that is correct?

If you were going to telnet or ssh to your server that contains the mysql db is that the server name that you use? Maybe you could give your host a call and see what server name to use to connect from another server.

mcavic

6:47 pm on Aug 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a firewall between the servers?

Oh - also, the mysql server has to be configured to allow connections from that particular client.

mysql> use mysql;
mysql> select host, user from user;
+-----------+------------+
¦ host ¦ user ¦
+-----------+------------+
¦ localhost ¦ mcavic ¦
¦ localhost ¦ root ¦
+-----------+------------+

The host column should list the host name of the client you're connecting from, according to DNS. Do an nslookup of the client's ip address to get the correct name. Or use % (I think) to allow all clients.

flashman

10:09 am on Aug 24, 2003 (gmt 0)

10+ Year Member



Thanks for asnwers. I still have nothing. There's no firewall between servers. Anyway thanks.

justageek

4:55 pm on Aug 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've seen problems with dns and Windows. If you windows then use the ip of the other database. Never had a problem since.