Custom post type needs to capability to create and edit by some specific user role

See if this article, which I published last year, helps.

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