SQL Upgrade

agentgibbs wrote on Tuesday, September 13, 2016:

Trying to upgrade from version 4.1.2 directly to 4.2.2 but receive the following error:

Updating global configuration defaults…

ERROR: query failed: SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id=? AND constant_name = ? LIMIT 1

Error: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’

C:\xampp\htdocs\openemr-4.2.2\library\translation.inc.php at 36:sqlStatementNoLog
C:\xampp\htdocs\openemr-4.2.2\library\globals.inc.php at 2426:xl(Māori)
C:\xampp\htdocs\openemr-4.2.2\sql_upgrade.php at 71:require_once(C:\xampp\htdocs\openemr-4.2.2\library\globals.inc.php)

Has anyone experienced the same or similar problem?

visolveemr wrote on Wednesday, October 05, 2016:

Hi Gerald Cohen,

To fix this kind Error follow these steps

SET collation_connection = ‘utf8_general_ci’

then for your databases

ALTER DATABASE db CHARACTER SET utf8 COLLATE utf8_general_ci

ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci

Replace the db with the DATABASE and table with appropriate table that has collations issue…

Please let us know if this helps.

Thanks,
ViSolve OpenEMR Support Team
ViSolve