Mysql启动配置文件加载路径
Mysql可以读取到的配置文件
/etc/my.cnf
/etc/mysql/my.cnf
/usr/local/mysql/etc/my.cnf
~/.my.cnf
(mysqld --verbose --help | grep my.cnf可以看到)
[root@edu mysql3306]# mysqld --defaults-file=/data/mysql/mysql3306/my3306.cnf --print-defaults
mysqld would have been started with the following arguments:--user=mysql --basedir=/usr/local/mysql/ --datadir=/data/mysql/mysql3306/data --server_id=1893306 --port=3306 --character_set_server=utf8 --explicit_defaults_for_timestamp=off --log_timestamps=system --socket=/tmp/mysql3306.sock --read_only=0 --skip_name_resolve=1 --auto_increment_increment=1 --auto_increment_offset=1 --lower_case_table_names=1 --secure_file_priv= --open_files_limit=65536 --max_connections=1000 --thread_cache_size=64 --table_open_cache=81920 --table_definition_cache=4096 --table_open_cache_instances=64 --max_prepared_stmt_count=1048576 --binlog_format=row --log_bin=mysql-bin --binlog_rows_query_log_events=on --log_slave_updates=on --expire_logs_days=7 --binlog_cache_size=65536 --slave-preserve-commit-order=ON --log_error=error.log --general_log=off --general_log_file=general.log --slow_query_log=on --slow_query_log_file=slow.log --long_query_time=1.000000 --gtid_mode=on --enforce_gtid_consistency=on --skip_slave_start=1 --master_info_repository=table --relay_log_info_repository=table --slave_parallel_type=logical_clock --slave_parallel_workers=4 --binlog_group_commit_sync_delay=100 --binlog_group_commit_sync_no_delay_count=10 --default_storage_engine=innodb --default_tmp_storage_engine=innodb --innodb_data_file_path=ibdata1:100M:autoextend --innodb_temp_data_file_path=ibtmp1:12M:autoextend --innodb_buffer_pool_filename=ib_buffer_pool --innodb_log_group_home_dir=./ --innodb_log_files_in_group=3 --innodb_log_file_size=100M --innodb_file_per_table=on --innodb_online_alter_log_max_size=128M --innodb_open_files=65535 --innodb_page_size=16k --innodb_thread_concurrency=0 --innodb_read_io_threads=4 --innodb_write_io_threads=4 --innodb_purge_threads=4 --innodb_page_cleaners=4 --innodb_print_all_deadlocks=on --innodb_deadlock_detect=on --innodb_lock_wait_timeout=20 --innodb_spin_wait_delay=128 --innodb_autoinc_lock_mode=2 --innodb_io_capacity=200 --innodb_io_capacity_max=2000 --innodb_stats_auto_recalc=on --innodb_stats_persistent=on --innodb_stats_persistent_sample_pages=20 --innodb_adaptive_hash_index=on --innodb_change_buffering=all --innodb_change_buffer_max_size=25 --innodb_flush_neighbors=1 --innodb_doublewrite=on --innodb_log_buffer_size=128M --innodb_flush_log_at_timeout=1 --innodb_flush_log_at_trx_commit=1 --innodb_buffer_pool_size=100M --innodb_buffer_pool_instances=4 --autocommit=1 --innodb_old_blocks_pct=37 --innodb_old_blocks_time=1000 --innodb_read_ahead_threshold=56 --innodb_random_read_ahead=OFF --innodb_buffer_pool_dump_pct=25 --innodb_buffer_pool_dump_at_shutdown=ON --innodb_buffer_pool_load_at_startup=ON --performance_schema=off --performance_schema_consumer_global_instrumentation=on --performance_schema_consumer_thread_instrumentation=on --performance_schema_consumer_events_stages_current=on --performance_schema_consumer_events_stages_history=on --performance_schema_consumer_events_stages_history_long=off --performance_schema_consumer_statements_digest=on --performance_schema_consumer_events_statements_current=on --performance_schema_consumer_events_statements_history=on --performance_schema_consumer_events_statements_history_long=on --performance_schema_consumer_events_waits_current=on --performance_schema_consumer_events_waits_history=on --performance_schema_consumer_events_waits_history_long=off --performance-schema-instrument=memory/%=COUNTED