MySQL Forums
Forum List  »  Install & Repo

Re: MySQL 5.7.21 for Mac OS X 10.13 ignoring my.cnf directives for character set and collation
Posted by: T G
Date: March 14, 2018 02:39PM

If it helps others, I was able to get the following character set and collation directives to work within ~/.my.cnf.

Some charset and collation options such as database character set, server character set, database collation, and server collation are still not being set and I have no idea how or where these can be set.

[client]
default-character-set = utf8mb4 # works

[mysql]
default-character-set = utf8mb4 # works

[mysqld]
default-character-set = utf8mb4 # Seems to have no effect
#character-set-system = utf8 # Default, can't be overridden
character-set-client = utf8mb4 # works
character-set-connection = utf8mb4 # works
character-set-database = utf8mb4 # doesn't work
character-set-results = utf8mb4 # works
character-set-server = utf8mb4 # doesn't work
character-set-client-handshake = FALSE # Always use default encoding

default_collation = utf8mb4_unicode_ci # Seems to have no effect
collation-connection = utf8mb4_unicode_ci # works
#collation-database = utf8mb4_unicode_ci # doesn't work with dash
collation_database = utf8mb4_unicode_ci # doesn't work with underscore
#collation-server = utf8mb4_unicode_ci # doesn't work with dash
collation_server = utf8mb4_unicode_ci # doesn't work with underscore

init_connect = 'SET NAMES utf8mb4'
init_connect = 'SET collation_connection = utf8mb4_unicode_ci'

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL 5.7.21 for Mac OS X 10.13 ignoring my.cnf directives for character set and collation
T G
March 14, 2018 02:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.