您的位置:首页 > 数据库 > MySQL

mysql 记录

2013-11-10 21:44 106 查看
mysql 区分大小写设置:my.cnflower_case_table_names = 00:区分大小写,1:不区分大小写
修改swappiness参数,让操作系统尽可能最大程度利用物理内存,而非虚拟内存
$cat /proc/sys/vm/swappiness
60
$echo 0> /proc/sys/vm/swappiness
如何查看那个进程占用swap的大小,如下:
mysql主从从级联复制(A->B->C)架构 master A ——–> slave B——-> slave C除正常配置主从配置文件外,需加在B的my.cnf上加log_slave_updates=1参数log_slave_updates 是否从服务器从主服务器收到的更新应记入从服务器自己的二进制日志。要想生效,必须启用从服务器的二进制记录。

slave_skip_errors => ALL # 从服务器忽略所有错误

主从同步延时:
Because the log buffer is written out to the log file at each transaction commit and the flush to disk operation is performed on the log file. Writing and flushing operations are time expensive for only one transaction. It will be better to perform these operations for several transactions instead of only one.
SET GLOBAL innodb_flush_log_at_trx_commit = 0
执行后解决,让innodb_flush_log_at_trx_commit=0 #不缓存,让事务实时写入。
echo -n 'Max processes=SOFT_LIMITS:HARD_LIMITS' > /proc/`pidof mysqld`/limits


本文出自 “Art_Hero” 博客,请务必保留此出处http://curran.blog.51cto.com/2788306/1322963
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: