Re: using database without mysql installed
| From: | Chris | Date: | Sun, 26 Oct 2008 21:53:37 +0000 |
| Subject: | Re: using database without mysql installed | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45562@lists.php.net to get a copy of this message | ||
Patrick Price wrote:
I am trying to access a mysql database server from a php 5.2 server that doesn't have mysql installed on it. I don't have access or the ability to reinstall php on this server. Is it possible to install mysql after php is installed and up and running?Of course. php just needs the php-mysql connector. When that's provided doesn't matter (just remember to restart the webserver).
The best solution I could think of would be to require a php file that is running on a server that I have control of and that has mysql installed and using that file to call the database to get the information I need.Connect to mysql remotely. The db does not have to be on the same machine at all. mysql_connect lets you put in a server name - it can be an ip address (recommended) or a hostname (not so recommended - if dns plays up, you can't connect). mysql_connect('192.168.0.50', 'user', 'pass'); -- Postgresql & php tutorials http://www.designmagick.com/