add_menu_page() with function inside a class [duplicate]

add_action must be inside the plugin class and should look like

 add_action( 'admin_menu', array( $this, 'add_menu_items' ) );

Usually this line presents in the __construct() method.

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