Home > MySQL > Connecting to MySQL using PHP.

Connecting to MySQL using PHP.

PHP access to MySQL is available but access is restricted to the Pulsant web servers.

PHP provides specific support for MySQL:

$db = mysql_connect($servername, $username, $password);

You will need to set $servername, $username and $password to suit your database as detailed for MySQL

Both mysql_connect and mysql_pconnect should work, but pconnect will provide a persistent connection if required. For more details, have a look at: http://www.php.net/manual/en/ref.mysql.php