Categories
MySQL Setup Web-Hosting

WHMCS database error – Mix of collations utf8_unicode_ci

Mix of collations utf8_unicode_ci

Oops!
Something went wrong and we couldn’t process your request.
Please go back to the previous page and try again.
If the problem persists, please contact us.

Back to Homepage

For additional assistance, please reference the WHMCS TroubleShooting Guide »

PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation ‘like’ in /home/xxx/public_html/whmcs/vendor/illuminate/database/Connection.php:331
Stack trace:
#0 /home/xxx/public_html/whmcs/vendor/illuminate/database/Connection.php(331): PDO->prepare(‘select * from `…’)
#1 /home/xxx/public_html/whmcs/vendor/illuminate/database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}(‘select * from `…’, Array)

Today encountered this error after upgrading MySQL and WHMCS as well. As this is the error related to collations, you will get suggestions to update tables and all ! Developer’s job !
However, a simple temporary fix to this is update your configuration file by commenting $mysql_charset = ‘utf8’; line.

You are done !