4g内存 mysql_mysql 4G内存配置表

[client]

#password=your_password

socket=/tmp/mysql.sock  ###通信协议等等的保存,[mysqld]必须同时有此行

##mysql.sock若丢失,临时连接数据库方法:

##/usr/local/mysql/bin/mysql -uroot -p1 --protocol tcp -hlocalhost 连接

##解决丢失mysql.sock只需要重启下mysql即可

port=3306    ##客户端默认连接端口,如更改同时要更改下方mysqld的port一致

default-character-set=utf8  ###客户端默认连接字符集

[mysqld]

basedir=/usr/local/mysql/

datadir=/usr/local/mysql/var/

port=3306

socket=/tmp/mysql.sock  ###通信协议等等的保存

key_buffer=512M

max_allowed_packet=16M

table_cache=2048

thread_cache=256

join_buffer_size=64M

sort_buffer=64M

record_buffer=64M

max_connections=250

wait_timeout=120

interactive_timeout=120

max_connect_errors=30000

long_query_time=1

max_heap_table_size=256M

tmp_table_size=128M

thread_concurrency=8

myisam_sort_buffer_size=128M

log-bin=mysql-bin  开启BIN-log日志,一般在数据同步时用到使用,

###windows有些是log-bin即可

########show variables like'%bin%'; 查看bin-log是否开启####3

character-set-server=utf8  ###服务器和数据库默认字符集 collation-server=utf8_general_ci ####让order by 等根据什么排序筛选的校验字符集

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值