How to get next_posts_link working with a customised page

By changing the loop to use $wp_query instead of $query it worked. My challenge for another day is to delve into the differences between $wp_query and $query!

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