Why custom post redirecting to index page?

Please try to remove following line from last line

'rewrite' => array('slug' => 'events','with_front' => false)

And Visit the permalinks page at admin side (which will flush it) and save/check again. WordPress probably just needs to be nudged to recognize your addition to the hierarchy.

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