Can you open a media frame to sellect an attachment to associate with another attachment you are editing on an existing media frame?

I figured this out. You CAN open another frame Here is my code:

jQuery(document).ready(function ($) {
    var frame;
    
    frame = wp.media();
    $(document).on('click', '.compat-field-add_attachment input', function (e) {
    
        get_attachment(frame);
    
    
    });
});
function get_attachment(frame) {



    // Create the media frame.
    frame = wp.media.frames.meta_image_frame = wp.media({
        // Tell the modal to show only images.
        library: {
            type: 'image'
        },
    });

    // When an image is selected, run a callback.
    frame.on('close', function () {        // Grab the selected attachment.
        attachment = frame.state().get('selection').first().toJSON();
        attachment_url = attachment.url;
        

        $('.compat-field-add_attachment input').val(attachment_url);

    });

    frame.open();


}

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