0%

008-mysql5.7配置文件

摘要:008-mysql5.7配置文件

docker

1
2
docker run -p 53306:3306 --name mymysql57 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
docker exec -it mymysql57 /bin/bash

进入docker后查看

1
ls /etc

没有 my.cnf,存在mysql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ls /etc/mysql
# conf.d my.cnf my.cnf.fallback mysql.cnf mysql.conf.d
cat /etc/mysql/my.cnf
# 意思是配置文件在这两个目录下
# !includedir /etc/mysql/conf.d/
# !includedir /etc/mysql/mysql.conf.d/
cat /etc/mysql/mysql.cnf
# 意思是配置文件在这两个目录下
# !includedir /etc/mysql/conf.d/
# !includedir /etc/mysql/mysql.conf.d/

# ------------------------------------------
ls /etc/mysql/conf.d/
# docker.cnf mysql.cnf mysqldump.cnf
cat /etc/mysql/conf.d/docker.cnf
# [mysqld]
# skip-host-cache
# skip-name-resolve
cat /etc/mysql/conf.d/mysql.cnf
# 空
cat /etc/mysql/conf.d/mysqldump.cnf
# [mysqldump]
# quick
# quote-names
# max_allowed_packet = 16M

# ------------------------------------------
ls /etc/mysql/mysql.conf.d/
# mysqld.cnf
cat /etc/mysql/mysql.conf.d/mysqld.cnf
# [mysqld]
# pid-file = /var/run/mysqld/mysqld.pid
# socket = /var/run/mysqld/mysqld.sock
# datadir = /var/lib/mysql
# #log-error = /var/log/mysql/error.log
# # By default we only accept connections from localhost
# #bind-address = 127.0.0.1
# # Disabling symbolic-links is recommended to prevent assorted security risks
# symbolic-links=0

故核心配置在: /etc/mysql/mysql.conf.d/mysqld.cnf

一分也是爱,两分情更浓【还没有人赞赏,支持一下呗】