Sign inSign up

zackdevops/mysql-server

By zackdevops

•Updated over 5 years ago

Image
0

70

zackdevops/mysql-server repository overview

from official repo.

⁠demo
⁠config file /etc/nginx/conf.d/mysql.cnf
[mysql]
#设置mysql客户端默认字符集
default-character-set=utf8
socket=/var/lib/mysql/mysql.sock

[mysqld]
user=mysql
#mysql5.7以后的不兼容问题处理
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
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

#允许最大连接数
max_connections=200

#服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8

#修改默认排序规则
collation-server=utf8_bin

#创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

lower_case_table_names=1

max_allowed_packet=256M

innodb_log_file_size=2GB

transaction-isolation=READ-COMMITTED

server-id=1

log_bin=/var/lib/mysql/binlog/mysql-bin

expire_logs_days=14

binlog_format=row

sync_binlog=1

innodb_flush_log_at_trx_commit=1

skip_name_resolve = 1

wait_timeout=31536000

interactive_timeout=31536000
 
#设置时区
default-time_zone='+8:00'


[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

MYSQL_ONETIME_PASSWORD=true
#
# include all files from the config directory
#
#!includedir /etc/mysql/conf.d/
#!includedir /etc/mysql/mysql.conf.d/

Tag summary

Content type

Image

Digest

Size

86.9 MB

Last updated

over 5 years ago

docker pull zackdevops/mysql-server:5.7.26