RE: [PHP-WIN] Setting up MySQL for PHP
| From: | Charles Butler | Date: | Thu, 04 Oct 2001 20:27:04 +0000 |
| Subject: | RE: [PHP-WIN] Setting up MySQL for PHP | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13009@lists.php.net to get a copy of this message | ||
Even with it being on a separate server, setting up MySQL and PHP to
work together is almost flawless, with ODBC and MySQL being enabled by
default on the windows PHP ver, just plugin the code.. To test this
theory you can always use the following code (as I do when setting up a
new server):
<?php
$sqlhost = "12.110.x.x";
$sqluser = "username";
$sqlpass = "password";
$conn = mysql_connect($sqlhost, $sqluser, $sqlpass) or
die(mysql_error());
?>
That will test to see if you can connect to the host. Simple :)
For more information, either read the MySQL documentation along with the
PHP documentation, or check out devshed's tutorials.
--
Charles Butler
cbutler@jtron.net
Research and Development
American Telanet Corp.