The mysql will first to find the configuration file from /etc/my.cnf
so first copy the sample configuration file to the folder /etc/
use below command to do this:
also the rights of this file should be 644.
then modify the file to add below data:
[client]
default-character-set=utf8
[mysqld]
default-storage-engine=INNODB
so first copy the sample configuration file to the folder /etc/
use below command to do this:
sudo cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
also the rights of this file should be 644.
then modify the file to add below data:
[client]
default-character-set=utf8
[mysqld]
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci
The whole file will show like below: