1、如何查找配置文件
a、如果是win10安装,配置文件名为:my.ini,可在C:\ProgramData\MySQL\MySQL Server 5.7查找,建议使用everything搜索my.ini
b、linux下搜索my.cnf:
cd /
find -iname my.cnf #或者locate my.cnf
2、如何查找数据存储路径
可以直接找到对应路径:
详细参数:
[mysqld]
port = 3306 #端口号
socket = /phpstudy/data/mysql.sock #sock位置
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log-bin=mysql-bin
binlog_format=mixed
server-id = 1 #留意
[mysqldump]
quick
max_allowed_packet = 16M #这里在数据备份时,单表太大,会涉及到
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout