Show all post of a taxonomy with one specific term not working

As written here, you need to use two nested arrays in the tax_query argument.

So, with your arguments it should look like this:

$args = array ( 'post_type' => 'restaurants', 'tax_query' => array (array( 'taxonomy' => 'location', 'field' => 'slug', 'terms' => 'citya') ), 'order_by' => 'title', 'order' => 'ASC' );

If you only need to query for 1 Term, you can also use the easy way:

$args = array ( 'post_type' => 'restaurants', 'location' => 'citya' , 'order_by' => 'title', 'order' => 'ASC' );

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