Trying to display user meta by “name” – not by “ID”

Use get_category() to convert the ID into a category data object.

$cid = get_user_meta($uid, 'user_location', true);
$c = get_category($cid);
echo $c->name;

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