命令行
docker run --name mysql-8016 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -v /root/wyp/mysql8/data:/var/lib/mysql:rw -v /root/wyp/mysql8/log:/var/log/mysql:rw -v /root/wyp/mysql8/config/my.cnf:/etc/mysql/my.cnf:rw -v /root/wyp/mysql8/mysql-files:/var/lib/mysql-files/ -d mysql:8.0.16
my.conf
[client]
default-character-set=utf8mb4
[mysql]
default-character-set=utf8mb4
[mysqld]
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysqld/mysqld.sock
datadir=/var/lib/mysql
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
innodb_use_native_aio=0
innodb_flush_log_at_trx_commit=0
log_queries_not_using_indexes=0
slow_query_log=1
skip-external-locking
skip-name-resolve
symbolic-links=0
max_allowed_packet = 16M
max_connections=10240
key_buffer_size=384M
table_open_cache=512
sort_buffer_size=2M
read_buffer_size=2M
read_rnd_buffer_size=8M
myisam_sort_buffer_size=64M
thread_cache_size=8
log-bin=mysql-bin
binlog_format=mixed
expire_logs_days=10
sync_binlog=0
server-id=1
default-authentication-plugin = mysql_native_password
[mysqldump]
quick
max_allowed_packet=16M
[myisamchk]
key_buffer_size=128M
sort_buffer_size=20M
read_buffer=2M
write_buffer=2M
[mysqlhotcopy]
interactive-timeout
网友评论