How to change the connection collation of Mysql
<p>How can I change connection collation of mysql database?</p>

<p>I am using Mysql workbench 5.5 and mysql 5.5 in ubuntu 14.</p>

<p>When I execute a stored procedure, an error occurs:</p>

<blockquote>
  <p>Error Code: 1267. Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='</p>
</blockquote>

<p>I have search though the internet, which has a temp solution that is to amend </p>

<pre><code>COLLATE utf8_unicode_ci;
</code></pre>

<p>in the stored procedure. </p>

<p>But I want to fix this problem for all stored procedures in the future. I have found </p>

<pre><code>SHOW VARIABLES LIKE 'collation%';
</code></pre>

<p>which return this.</p>

<pre><code>collation_connection    utf8_general_ci
collation_database  utf8_unicode_ci
collation_server    latin1_swedish_ci
</code></pre>

<p>how can I change <code>utf8_general_ci</code> to <code>utf8_unicode_ci</code>?</p>