vi /etc/my.cnf
[mysqld]
port = 3306
lower_case_table_names = 1
sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
basedir=/usr/local/mysql
datadir=/home/mysql
socket=/tmp/mysql.sock
log-error=/home/mysql/mysql.err
pid-file=/home/mysql/mysql.pid
#character config
character_set_server=utf8
symbolic-links=0
explicit_defaults_for_timestamp=true