title: MySql change collation in view
body: <p>I have a view "name_all" in mysql which structure is</p>
  
  <pre><code>colName     varchar(30)  utf8_general_ci
  
  date    varchar(76)     utf8_general_ci
  
  name  varchar(43)   latin1_swedish_ci
  </code></pre>
  
  <p>when I try to run query: </p>
  
  <pre><code>SELECT CONCAT(`colname`,' of Mr. ',`name`,' Expire on ',`date`) FROM name_all
  </code></pre>
  
  <p>it give error:</p>
  
  <pre><code> #1271 - Illegal mix of collations for operation 'concat'
  
  "colName" is basically a Column Name which is used as a row in this View
  
  "date" is mysql Date which is converted in this format '%a %D %b, %Y'
  
  "name" is concatenation of firstname, middlename, lastname from a table
  </code></pre>
  
  <p>How do I solve this issue and what is my mistake?</p>
  
  <p>when i run query SHOW VARIABLES LIKE  'collation%'
  Result is</p>
  
  <pre><code>  Variable_name         Value
    collation_connection  utf8_general_ci
    collation_database    latin1_swedish_ci
    collation_server      latin1_swedish_ci
  </code></pre>