PHP + Remote MySql connection question
Moderator: General Moderators
-
mukul_chou
- Forum Newbie
- Posts: 5
- Joined: Tue Jun 17, 2008 4:23 am
PHP + Remote MySql connection question
I have been told that to connect a MySql database through php the MySql server has to be physically installed on the same server as the apache. Is it true? A little bit of search indicates not. I came to know php can connect to MySql through TCP/IP and socket. Tcp/ip is default. For socket connection I came to know MySql server has to be physically installed on the same server as the apache [ref. phpMyAdmin documentation]. What about tcp/ip? A real test consisting different physical server will resolve the matter for sure. But availing 2 physical server (/pc) is bit difficult for me.
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: PHP + Remote MySql connection question
No. In fact, the first parameter to the mysql_connect function is the server name.mukul_chou wrote:I have been told that to connect a MySql database through php the MySql server has to be physically installed on the same server as the apache. Is it true?