How to solve this custom post type goes to 404 page?

You custom post type is NOT public.

Add following lines to your register_post_type array

'public' => true,
'publicly_queryable' => true, 

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