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.
本文出自 “Art_Hero” 博客,请务必保留此出处http://curran.blog.51cto.com/2788306/1322963
修改swappiness参数,让操作系统尽可能最大程度利用物理内存,而非虚拟内存
$cat /proc/sys/vm/swappiness
60
$echo 0> /proc/sys/vm/swappiness如何查看那个进程占用swap的大小,如下:
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
相关文章推荐
- mysql 实现行号的方法——如何获取当前记录所在行号
- Linux下apache+php+mysql搭建配置记录
- MySQL查询重复字段,及删除重复记录的方法
- (摘)mysql使用rand随机查询记录效率测试
- mysql 批量更新与批量更新多条记录的不同值实现方法
- MySQL导出记录到Excel表格下载打开后乱码问题
- Mysql判断记录是否存在
- mysql将执行过的sql放到历史记录里面
- 【错误记录】记录蛋疼的 mysql 错误
- mysql中删除重复记录,只保留一条
- mysql-5.6.37-winx64安装记录(安装双版本mysql)
- MySQL查询倒数第二条记录实现方法
- MySQL 语句使用到的关键字 函数 记录
- [乐意黎转载]mysql删除记录时如何让自动递增的字段重新排序
- 【mysql 】sql删除重复记录 You can't specify target table '表名' for update in FROM clause
- mysql数据恢复失败记录
- mysql删除重复记录
- SecureCRT连接Linux显示Mysql记录中文乱码
- 随机获取Mysql数据表的一条或多条记录
- CentOS6.6环境编译安装MySQL 5.6的详细记录