How check if a post is saved from backend or frontend?

I would add some hidden input field to frontend form, and check for its presence in the save_post hook.

...
<input type="hidden" name="saved-on-frontend" value="1">
...

And then check for it in that hooked function:

function my_save_hook() {

    if( isset( $_POST['saved-on-frontend'] ) ) {
        return; // don't do anything ... 
    }

}
add_action( 'save_post_CUSTOM_POST_TYPE', 'my_save_hook' );

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