Test MySQL Database Connection with PHP

Download Template
PHP script to test if you can connect to a MySQL database

brakertech
February 16, 2012



<?php
mysql_connect("%{ip_of_database_server}%", "%{username}%", "%{password}%") or die(mysql_error());
echo "Connected to MySQL!!  FINALLY!<br />";
?>

You must be logged in to comment.