@robocoder opened this Issue on July 31st 2009 Contributor

From forum.

SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'concat'

Proposed fix:

Index: Piwik.php
===================================================================
--- Piwik.php    (revision 1344)
+++ Piwik.php    (working copy)
@@ -1233,6 +1233,7 @@
        Piwik_PostEvent('Reporting.createDatabase', $db);
        if(is_null($db))
        {
+            $dbInfos['driver_options'] = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8;');
            $db = Zend_Db::factory($config->database->adapter, $dbInfos);
            $db->getConnection();
            // see http://framework.zend.com/issues/browse/ZF-1398
@robocoder commented on July 31st 2009 Contributor

Or can we use?

    $db->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES utf8");
@robocoder commented on August 1st 2009 Contributor

(In [1347]) refs #891 - specify mysql connect driver option for utf8

@robocoder commented on August 4th 2009 Contributor

(In [1361]) refs #891 - revert patch

@robocoder commented on August 4th 2009 Contributor

Appears to be a red herring. User was using MySQL 3.x.

This Issue was closed on August 4th 2009
Powered by GitHub Issue Mirror