vim /etc/my.cnf # 文件内内容 [mysqld] basedir = /usr/local/mysql datadir = /usr/local/mysql/data socket = /usr/local/mysql/mysql.sock character-set-server=utf8 port = 3306 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [client] socket = /usr/local/mysql/mysql.sock default-character-set=utf8 #[mysqld] #datadir=/var/lib/mysql #socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks #symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd #[mysqld_safe] #log-error=/var/log/mariadb/mariadb.log #pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # #!includedir /etc/my.cnf.d