How do I create a page template to display a custom post type?

You don’t need to use a query, just create your tample and name single-YOURCUSTOMPOSTNAME.php, for more references take a look at:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)