> Hi all,
>
> can someone know how could i setup MySQL Server, so my
>  PHP Application on another server can connect to
> MySQL Server????

A quick google for php mysql connect found
http://us2.php.net/function.mysql-connect, which explains it pretty well.
The only thing that they don't go into is that you'd need to open the mysql
port in the firewall on the box running mysql.  The port is 3306 by default.

*NOTE:*  If you are going to do this, I would *highly* recommend that the
firewall rule that you write specifically open the port *only* to the
machine running the PHP app!

For instance (and somebody please verify this, as I'm just learning to craft
my own iptables rules):

php machine: 192.168.1.100
mysql machine: 192.168.1.101

iptables rule on the mysql machine:

-A RH-Lokkit-0-50-INPUT -p tcp -m tcp -s 192.168.1.100/32 --dport
3306 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p udp -m udp -s 192.168.1.100/32 --dport 3306 -j
ACCEPT

I haven't tried this out, so I can't vouch for it, but that's how I *think*
it should look.

Ben


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to