How to display a feature only if custom field value is set?

<?php
// get the value of our custom field
$meta_value = get_post_meta($post->ID, 'ratings', true);
// if it's not empty and the_ratings function exists:
if( !empty($meta_value) && function_exists('the_ratings') ){
    the_ratings();
}

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