Join the community today
Register Now

MariaDB utf8mb4

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, Jan 28, 2017.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    11:56 PM
    Working with IPB and their support for utf8mb4, I was wondering if adding utf8mb4 to the my.cnf as the default over utf8 would be advisable, since it's backwards compatible.

    I added this to my.cnf

    Code:
    [client]
    default-character-set = utf8mb4
    
    [mysql]
    default-character-set = utf8mb4
    
    [mysqld]
    character-set-server = utf8mb4
    collation-server = utf8mb4_unicode_ci
    
    Suggestions, thoughts?

     
    Last edited: Jan 28, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    55,189
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    1:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    see http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-sets.html and https://community.centminmod.com/threads/utf8mb4_general_ci-vs-utf8_general_ci.394/

    utf8mb4 was wider compatibility with foreign languages but there is a performance hit compared to utf8 and also issues you may have with index length limits you will need to manually work with depending on php web app's compatibility with utf8mb4 https://community.centminmod.com/th...ge-the-maximum-column-size-is-767-bytes.9669/

    and MySQL :: MySQL 5.6 Reference Manual :: 14.8.8 Limits on InnoDB Tables

    and MySQL :: MySQL 5.6 Reference Manual :: 10.1.9.8 Converting Between 3-Byte and 4-Byte Unicode Character Sets
     
  3. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    11:56 PM
    Great info! One of my servers is going to be IPS only and they fully support it. So, I should be good to go with that server.