title: Yii2: How to set MySQL Locale
body: <p>In one model I need to search dates as strings written in German language:</p>
  
  <pre><code>-&gt;andFilterWhere(['like', 'DATE_FORMAT(`date`,\'%d. %M %Y\')', $this-&gt;date])
  </code></pre>
  
  <p>Before the filter is applied, the locale has to be set with the following SQL command:</p>
  
  <pre><code>SET lc_time_names = 'de_DE';
  </code></pre>