Discover Centmin Mod today
Register Now

MariaDB utf8mb4

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

  1. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:32 PM
    1.13.x
    MariaDB 10.1.x
    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

    29,031
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,782
    Local Time:
    1:32 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Informative Informative x 1
  3. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:32 PM
    1.13.x
    MariaDB 10.1.x
    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.
     
    • Like Like x 1