how to get the post id in plugin

Using your code you could something like this:

function my_custom_admin_head(){
    global $post;
    echo '<script type="text/javascript"> var js_post_id =' . $post->ID . ';</script>';


}

And then just use the var js_post_id. You shoudl try to read about the script localization function and use it.

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