Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

Unknown character set: 'utf8mb4'

I am getting this error when trying to connect to the database on the initial install and cannot get past the screen because of this.
Unknown character set: 'utf8mb4'

I am using PHP 7.X and MySQL 5.1.73. Is there a way around this if I cannot upgrade to MySQL 5.5.3 which I think clears this up? Thanks.

Comments

  • CaylusCaylus ✭✭

    When you create your database (so before you do anything with Vanilla), is it possible to choose a different default character set/collation?

    I use latin1_swedish_ci, seems to work well.

  • Thanks for your reply. I did go into MySQL and try to change it to something different and tried to install again with no go.

  • CaylusCaylus ✭✭

    Could you add the following lines to config.php and pray really hard it works?

    $Configuration['Database']['CharacterEncoding'] = 'utf8';
    $Configuration['Database']['ExtendedProperties']['Collate'] = 'utf8_unicode_ci';

    Linc
  • Thanks, could you please explain what this does, each line?

  • CaylusCaylus ✭✭

    It changes the character encoding that Vanilla uses.

    In config-defaults.php you see a list of default configuration options (don't change anything in this file).

    You can change those values by redefining them in config.php.

    These lines are in config-defaults.php:

    $Configuration['Database']['CharacterEncoding'] = 'utf8mb4';
    $Configuration['Database']['ExtendedProperties']['Collate'] = 'utf8mb4_unicode_ci';
    

    And I'm assuming those are the lines causing you trouble because of your old MySQL version.

Sign In or Register to comment.