Embedded pages by ID are not respecting Private and Draft status

You can use the get_page() to get the current status and do something based on its output.

 $id = YOUR_ID; 
 $p = get_page($id);
 $status = $p->post_status;

 if($status == 'publish'){
      //Do something
 } 

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