Custom Post Type categories at edit post not hierarchical

It might be because you are using reserved term name as first argument; ‘categories’ is wordpress core taxonomy and you should use something else like ‘ph_categories’. After that you will have to add those terms again.

Reference: Codex

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