Disable edit media attachments?

I figured it out. Just put this in your functions.php file

add_action('admin_head-media-upload-popup', 'remove_edit_image_button'); // for the pop up media box
add_action('admin_head', 'remove_edit_image_button'); // for the media page

function remove_edit_image_button()
{
?>
<style>
    .A1B1 p .button
    {
        display:none;
    }
</style>
<?php
}

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