How to restrict author to only access one custom post type ?

As linked to in the other comment by @AXheladini; you will need to set up Roles and/or Capabilities. Once that is done use the function current_user_can() (codex page) to allow or deny the actual page.

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