Server Character Set and Collation MySQL Server has a server character set and a server collation. By default, these are  utf8mb4  and utf8mb4_0900_ai_ci , but they can be set explicitly at server startup on the command line or in an option file and changed at runtime. Initially, the server character set and collation depend on the options that you use when you start mysqld . You can use  --character-set-server  for the character set. Along with it, you can add  -- collation-server  for the collation. If you don’t specify a character set, that is the same as saying --character-set-server=utf8mb4 . If you specify only a character set (for example,  utf8mb4 ) but not a collation, that is the same as saying  --character-set-server=utf8mb4 --collation- server=utf8mb4_0900_ai_ci  because  utf8mb4_0900_ai_ci  is the default collation for  utf8mb4 . Therefore, the following three commands all have the same effect: One way to change the settings is by recompiling. To change the default server character set and collation when building from sources, use the  DEFAULT_CHARSET  and  DEFAULT_COLLATION  options for  CMake . For example: cmake . -DDEFAULT_CHARSET=latin1 Or: cmake . -DDEFAULT_CHARSET=latin1 \ -DDEFAULT_COLLATION=latin1_german1_ci Both  mysqld  and  CMake  verify that the character set/collation combination is valid. If not, each program displays an error message and terminates. The server character set and collation are used as default values if the database character set and collation are not specified in  CREATE DATABASE  statements. They have no other purpose. The current server character set and collation can be determined from the values of the character_set_server  and  collation_server  system variables. These variables can be changed at runtime. Every database has a database character set and a database collation. The  CREATE DATABASE  and ALTER DATABASE  statements have optional clauses for specifying the database character set and collation: CREATE DATABASE  db_name [[DEFAULT] CHARACTER SET  charset_name ] 1934 10.3.3 Database Character Set and Collation 10.3.2 Server Character Set and Collation • utf8mb4_unicode_520_ci  is based on UCA 5.2.0 weight keys (http://www.unicode.org/Public/ UCA/5.2.0/allkeys.txt). • utf8mb4_unicode_ci  (with no version named) is based on UCA 4.0.0 weight keys (http:// www.unicode.org/Public/UCA/4.0.0/allkeys-4.0.0.txt). •For Unicode character sets, the  xxx _general_mysql500_ci  collations preserve the pre-5.1.24 ordering of the original  xxx _general_ci  collations and permit upgrades for tables created before MySQL 5.1.24 (Bug #27877). mysqld mysqld --character-set-server=utf8mb4 mysqld --character-set-server=utf8mb4 \ --collation-server=utf8mb4_0900_ai_ci