mysqlファイル
1867 ワード
mysql :
+ + +pid + +innodb 。
:mysql --help|grep my.cnf mysql 。
2 : + session+global
: session , : session
session:@@session ,global:@@global
: + + +
:show variables like 'log_error';
:slow-query-log-file: ,long_query_time:
slow_query_log ; mysqldump: slowlog 。
log_throttle_queries_not_using_indexes: slowlog sql 。
long_query_time
slowlog :
show variables like 'log_output';
set gloal log_output=table
select * from mysql.slow_log
alter table mysql.slow_log=myisam
:
: .log
: database , select,show,
: , +
mysqlbinlog: 。
bin_log.index: ,bin_log_XXXX: , datadir 。
show variables like 'log_bin':
max_binlog_size: , +1
binlog_cache_size:
ssync_binlog:
binlog_format: , statement,row,mixed
statement: sql
row: 。( )
mixed: statement row。
:socket
pid :pid_file
:frm
innodb :
:ibdata1, innodb_data_file_path: : :
: :innodb_file_per_table
: , , , 。
:ib_logfile0 ib_logfile1
innodb , 2
innodb_log_file_size:
innodb_log_files_in_group:
innodb_mirrored_log_groups:
innodb_log_group_home_dir:
show variables like 'inodb%log%':
, , , 。
innodb_flush_log_at_trx_commit: ,
0: ,
1: ,
2: , 。
acid , innodb_flush_log_at_trx_commit 1
:
,
, mysql