title: Why can't I use a specific collation in MySQL?
body: <p>I have a table with the character set <code>latin1</code> (checked by <code>show variables like "character_set_database";</code>) and a default collation of <code>latin1_swedish_ci</code> (checked by <code>SHOW TABLE STATUS;</code>).</p>
  
  <p>I'd like to run a query using the collation <code>latin1_general_cs</code>, which is compiled on my system (checked by <code>Show collation LIKE "%_cs";</code>):</p>
  
  <pre><code>select * from myTab WHERE col RLIKE '[[:upper:]]' COLLATE 'latin1_general_cs' LIMIT 10;
  </code></pre>
  
  <p>which gives an error:</p>
  
  <pre><code>ERROR 1253 (42000): COLLATION 'latin1_general_cs' is not valid for CHARACTER SET 'utf8'
  </code></pre>
  
  <p>Even the default collation does not work:</p>
  
  <pre><code>select * from myTab WHERE col RLIKE '[[:upper:]]' COLLATE 'latin1_swedish_ci' LIMIT 10;
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>ERROR 1253 (42000): COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'utf8'
  </code></pre>
  
  <p>Whats wrong? is it because my terminal sends data in UTF-8? (Is the "Connection in UTF-8"?) How can I anyway use case sensitive collation? I need it, otherwise it seems impossible to check for uppercase letters.</p>