mysql5.7数据库参数设置

mysql5.7数据库参数设置

#开启binlog日志

[mysqld]
server-id = xx
log-bin = mysql-bin
binlog-format = row

#设置数据库日志时间为系统时间(默认为utc时间)

[mysqld]
log_timestamps = SYSTEM

#开启gtid

[mysqld]
gtid-mode = on
enforce-gtid-consistency = true

#设置数据库默认字符集

[mysqld]
character-set-server=utf8

#查看数据库默认字符集

mysql> show variables like ‘%char%’;
±-------------------------±----------------------------------+
| Variable_name | Value |
±-------------------------±----------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /app/mysql-5.7.17/share/charsets/ |
±-------------------------±----------------------------------+
8 rows in set (0.00 sec)

你可能感兴趣的:(mysql)