Tweaks to make mysqli work

Aaron needed a code tweak for his machine, which he supplied.  Note that
DBPORT is now a separate variable, per mysqli standard.