Trouble with get_next_post() get_previous_post() returning null

You have to call setup_postdata($post).

get_next_post() and get_previous_post() depend on calls to a number of properties in the global $post variable which is populated by calling setup_postdata($post) or the_post(). If $post is empty it returns null.

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