How to Get Posts, Including Private Ones?

Set the post_status argument to an array of desired post status strings, or to the string any to query regardless of status entirely:

$posts = get_posts(array(
    'posts_per_page' => -1,
    'post_type'      => 'post',
    'post_status'    => array( 'publish', 'private' ),
));

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