Overriding default template if page slug and post type are same

Easy way to achieve this.

register_post_type( 'mypost',
    array(
        ...
        'has_archive' => false,
        ...
    )
);

After updating this reset the permalinks ‘Settings -> Permalink’

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