Mysql最小化配置
简介Mysql的配置文件可以有很多参数,但是一般可以可以让Mysql的配置文件只配置我们需要的一部分简单的配置项就可以运行,该文章就是记录Mysql配置文件的最小化配置。
Mysql配置文件其实可以只需要几行最简单的配置就可以让Mysql运行,但是这里的配置算是mysql配置的最小化的配置,内容如下:
[client]
#password = your_password
port = 3306
socket = /usr/local/mysql/mysql.sock
[mysqld]
port = 3306
socket = /usr/local/mysql/mysql.sock
basedir =/usr/local/mysql
datadir =/usr/local/mysql/data
pid-file = /usr/local/mysql/mysql.pid
#skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 8M
#table_open_cache = 4
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 1M
#net_buffer_length = 2K
thread_stack = 192K
server-id = 1
#一般需要开启二进制日志
log-bin=mysql-bin
binlog_format=mixed
#binlog_direct_non_transactional_updates=TRUE
#innodb_data_home_dir = C:\\mysql\\data\\
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\\mysql\\data\\
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
interactive-timeout