How to get single post by one author?

$args = array( 'author' => 1, 'numberposts' => 1 ); The author parameter isn’t documented on the get_posts() codex page, but it does work.

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