Cannot add javascript to footer

Your’re missing the call to wp_enqueue_script( 'search' ); after it’s registered.

function js_enqueue_search() {
    wp_register_script( 'search', get_stylesheet_directory_uri() . '/js/search.js', '', wp_get_theme()->get( 'Version' ), true );
    wp_enqueue_script( 'search' );
    wp_localize_script('search', 'search_ajax', array( 'ajaxurl' =>admin_url( 'admin-ajax.php' )));
}
add_action( 'wp_enqueue_scripts', 'js_enqueue_search' );

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