Way to add captions to gallery images by code

you can change caption programmatically by jquery something like this:

( function( $ ) {    
    function function_name() {
          $( '#gallery-<gallery_ID>-<image_ID>').text("new caption");
}

function_name();
} )( jQuery );

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