wp_insert_post() Callback?

$post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink

Codex:

http://codex.wordpress.org/Function_Reference/wp_insert_post

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