How to set the table collation to utf_general_ci using doctrine2
问题 Today I got the following error in an application which uses doctrine2 Message: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation 'like' I checked with phpmyadmin that the collation of the table is latin1_swedish_ci. Within my application I configured doctrine to use utf8 $em->getEventManager()->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\MysqlSessionInit('utf8', 'utf8_unicode_ci')); My database