OK I think I see what’s going on. My server is using PHP 7. mysql_connect() was completely removed from PHP 7 (http://php.net/manual/en/function.mysql-connect.php).
Thanks t-p! It helps to base one’s custom solution on the correct template!
Still new to WP. So much to learn…!