Add category selection to custom post type (plugin)

Alternatively to Kaiser’s answer, when you register the post type, simply use the taxonomies attribute:

register_post_type( 'my-cpt', array(
  ...
  'taxonomies' => array( 'category' ),
  ...
) );

Details on register_post_type() can be found here in Codex.

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