1.主配置文件
#/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 ‘Default options‘
#cat /etc/my.cnf
[client]
port = 3306 #指定MySQL的开放端口
socket = #套接字文件
[mysqld]
basedir = /usr/local/mysql #指定MySQL安装的绝对路径
datadir = /disk1/mysql #指定MySQL数据存放的绝对路径
log-error = /disk1/mysql/error.log #错误日志的存放路径
slow_query_log = OFF #慢查询日志
slow_query_log_file = /apsarapangu/disk1/mysql/slow.log
general_log = OFF #普通日志
general_log_file = /apsarapangu/disk1/mysql/general.log
socket = /usr/local/mysql/run/mysql.sock
innodb_flush_log_at_trx_commit = 0
innodb_data_home_dir = /disk1/mysql
innodb_log_group_home_dir = /disk1/mysql
innodb_data_file_path = ibdata1:2000M:autoextend
innodb_buffer_pool_size = 10240M #缓冲池
innodb_flush_method = O_DIRECT
innodb_log_file_size = 2G
innodb_log_buffer_size = 128M
#binlog #二进制日志
#log-bin = /disk1/mysql/mysql-bin
server_id=4294967295
expire_logs_days = 7 #存放时间
#server
port = 3306
skip-name-resolve
skip-ssl
max_connections = 20000
max_user_connections = 20000
max_allowed_packet = 1024M
default-storage-engine = INNODB #存储引擎
character-set-server = utf8
- 数据文件
当我们进入到datadir存放数据的目录,我们一般会发现现3种文件
user.frm #存放表结构
user.MYD #存放表数据
user.MYI #存放索引
。。。
。。。