In a server Ubuntu 16.04 I have installed MySQL 5.7.31.
To setup UTF8 in MySQL, I have changed the following sections.
[client] default-character-set=u