Skip to content

Instantly share code, notes, and snippets.

Focusing on bigger things

Will Wilhelm97

Focusing on bigger things
View GitHub Profile
chales / db-connect-test.php
Last active Jul 15, 2021
Script for a quick PHP MySQL DB connection test.
View db-connect-test.php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");