Skip to content

Instantly share code, notes, and snippets.

@manh-trinhquoc
Forked from xeoncross/utf8mb4.cnf
Created March 4, 2021 18:36
Show Gist options
  • Save manh-trinhquoc/3a55748be737daf557e01e23107b46d4 to your computer and use it in GitHub Desktop.
Save manh-trinhquoc/3a55748be737daf557e01e23107b46d4 to your computer and use it in GitHub Desktop.
Correctly set MySQL to use utf8 on ubuntu
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
# Increase performance
innodb_file_format=barracuda
innodb_file_format_max=barracuda
innodb_file_per_table=1
innodb_large_prefix=1
# Enable for space/memory saving for large tables
#innodb_default_row_format=COMPRESSED
# New default for tables MySQL 5.7+ / MariaDB 10.2+
#innodb_default_row_format=DYNAMIC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment