March 2020
Intermediate to advanced
608 pages
17h 17m
English
Open the /etc/mysql/my.cnf MySQL configuration file in your favorite editor and ensure that the following settings are set in the [client], [mysql], and [mysqld] sections, as follows:
# /etc/mysql/my.cnf[client]default-character-set = utf8[mysql]default-character-set = utf8[mysqld]collation-server = utf8_unicode_ciinit-connect = 'SET NAMES utf8'character-set-server = utf8
If any of the sections don't exist, create them in the file. If the sections already exist, add these settings to the existing configurations, and then restart MySQL in your command-line tool, as follows:
$ /etc/init.d/mysql restart