How to disable accessing the custom post types from frontend via a link?

I think setting 'publicly_queryable' => false should solve your problem!

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