paip.mysql备份慢的解决.txt

作者Attilax ,  EMAIL:1466519819@qq.com 

来源:attilax的专栏

地址:http://blog.csdn.net/attilax

版本5.0.45-community-nt

主数据库50W数据,备份的sql34M..压缩后5.8m

原来备份178 S.. 调整MY.INI  加大10倍...  而个88S... 不压缩的情况下45s

换成个5.6 , 还要中多时间,要不走粤慢兰..

不压缩的情况下43s...  调整MY.INI  加大10倍.  40S.....差距不明显木..

最终解决方案:copy备份

---------------------------

..块啊,7秒搞定..是热备份.不用关机..

参考其他自料儿..

====================

数据文件大约200GB,平时备份(mysqldump)压缩后的大小大约20GB,正常备份时间在2个小时内。一台服务器上,安装了多个mysql实例

,这个数据库是其中一个

mysql按照备份恢复方式分为逻辑备份和物理备份

逻辑备份是备份sql语句,在恢复的时候执行备份的sql语句实现数据库数据的重现

物理备份就是备份数据文件了,比较形象点就是cp下数据文件,但真正备份的时候自然不是的cp这么简单

这2种备份各有优劣,一般来说,物理备份恢复速度比较快,占用空间比较大,逻辑备份速度比较慢,占用空间比较小

mysqldump工具备份

mysqldump由于是mysql自带的备份工具,所以也是最常用的mysql数据库的备份工具。支持基于InnoDB的热备份。但由于是逻辑备份,所以

速度不是很快,适合备份数据量比较小的场景。

mysqldump完全备份+二进制日志 —>实现时间点恢复

看累挂CFG DEFAULT    show  VARIABLES like '%size%'

-----------------------------------------------

binlog_cache_size
32768

binlog_stmt_cache_size
32768

bulk_insert_buffer_size
8388608

delayed_queue_size
1000

host_cache_size
279

innodb_additional_mem_pool_size
8388608

innodb_buffer_pool_size
134217728

innodb_change_buffer_max_size
25

innodb_ft_cache_size
8000000

innodb_ft_max_token_size
84

innodb_ft_min_token_size
3

innodb_log_buffer_size
8388608

innodb_log_file_size
50331648

innodb_online_alter_log_max_size
134217728

innodb_page_size
16384

innodb_purge_batch_size
300

innodb_sort_buffer_size
1048576

innodb_sync_array_size
1

join_buffer_size
262144

key_buffer_size
8388608

key_cache_block_size
1024

large_page_size
0

max_binlog_cache_size
18446744073709547520

max_binlog_size
1073741824

max_binlog_stmt_cache_size
18446744073709547520

max_heap_table_size
16777216

max_join_size
18446744073709551615

max_relay_log_size
0

metadata_locks_cache_size
1024

myisam_data_pointer_size
6

myisam_max_sort_file_size
2146435072

myisam_mmap_size
4294967295

myisam_sort_buffer_size
8388608

optimizer_trace_max_mem_size
16384

performance_schema_accounts_size
100

performance_schema_digests_size
10000

performance_schema_events_stages_history_long_size
10000

performance_schema_events_stages_history_size
10

performance_schema_events_statements_history_long_size
10000

performance_schema_events_statements_history_size
10

performance_schema_events_waits_history_long_size
10000

performance_schema_events_waits_history_size
10

performance_schema_hosts_size
100

performance_schema_session_connect_attrs_size
512

performance_schema_setup_actors_size
100

performance_schema_setup_objects_size
100

performance_schema_users_size
100

preload_buffer_size
32768

profiling_history_size
15

query_alloc_block_size
8192

query_cache_size
1048576

query_prealloc_size
8192

range_alloc_block_size
4096

read_buffer_size
131072

read_rnd_buffer_size
262144

slave_pending_jobs_size_max
16777216

sort_buffer_size
262144

thread_cache_size
9

tmp_table_size
16777216

transaction_alloc_block_size
8192

transaction_prealloc_size
4096

加大10背

----------

log-error=d:/MySQL56/mysql_log_err.txt

thread_cache = 128

query_cache_type = 1

query_cache_size = 128M

join_buffer_size = 80M

sort_buffer_size = 20M  

  read_buffer_size = 20M 

 read_rnd_buffer_size = 20M

max_heap_table_size = 128M

tmp_table_size = 128M

binlog_cache_size = 12M

max_binlog_size = 512M

expire_logs_days = 3 

#  innodb_buffer_pool_size = 2G

innodb_use_sys_malloc = 1

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

#MySQL 数据库常见调优方法及参数设置 - 皮皮的个人页面 - 开源中国社区

paip.mysql备份慢的解决的更多相关文章

  1. paip.mysql 全文索引查询空白解决

    paip.mysql 全文索引查询空白解决   或者  Incorrect key file for table: \'%s\'. Try to repair it    作者Attilax  艾龙, ...

  2. Mysql备份迁移——MySqlBackup(.net)——(无法解决视图嵌视图报错)

    这里是利用MySqlBackup,可以再nuget中下载. 无法解决视图嵌视图报错的问题,只导表跟数据比较合适,如果有视图嵌视图,请参照Mysql备份迁移——Mysqldump(.NET调用Mysql ...

  3. PAIP.MYSQL SLEEP 连接太多解决

    PAIP.MYSQL SLEEP 连接太多解决 作者Attilax  艾龙,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.n ...

  4. Mysql备份系列(4)--lvm-snapshot备份mysql数据(全量+增量)操作记录

    Mysql最常用的三种备份工具分别是mysqldump.Xtrabackup(innobackupex工具).lvm-snapshot快照.前面分别介绍了:Mysql备份系列(1)--备份方案总结性梳 ...

  5. paip.mysql fulltext 全文搜索.最佳实践.

    paip.mysql fulltext 全文搜索.最佳实践.  作者Attilax  艾龙,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blo ...

  6. paip. mysql如何临时 暂时 禁用 关闭 触发器

    paip. mysql如何临时 暂时 禁用 关闭 触发器 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn ...

  7. mysql 备份与还原

    http://dev.yesky.com/281/35291281.shtml 每一种逻辑错误发生的概率都极低,但是当多种可能性叠加的时候,小概率事件就 放大成很大的安全隐患,这时候备份的必要性就凸显 ...

  8. Atitit.软件GUIbutton与仪表盘--db数据库区--导入mysql sql错误的解决之道

    Atitit.软件GUIbutton与仪表盘--db数据库区--导入mysql sql错误的解决之道 Keyword::截取文本文件后部分 查看提示max_allowed_packet限制 Targe ...

  9. mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.

    -------------------------------------------------------------------------------- mysql 备份报错mysqldump ...

随机推荐

  1. 读取Excel任务列表并显示在Outlook日历上

    前几天,公司发了一个任务安排,时间不固定,但要求准时到,为了给自己加一个提醒,也为了回顾一下以前的技术,特做了一个Demo. 读取Excel就不多说了,代码很简单,但支持老版本Excel和的版本Exc ...

  2. [scu 4423] Necklace

    4423: Necklace Description baihacker bought a necklace for his wife on their wedding anniversary. A ...

  3. apache开源项目--Mavibot

    Mavibot™ 是个Java 的多版本并发控制 BTree,是 JDBM(当前 Apache Directory 服务器的后端)的替代品, 但是有着更强的功能,能适应任意需要实现 Java MVCC ...

  4. 嵌入式Linux启动过程中的问题积累

    嵌入式Linux启动过程中的问题积累 Dongas 07-12-19 1.Bad Magic Number ## Booting image at 33000000 ... Bad Magic Num ...

  5. css选择器,有箭头与没箭头的区别

    div > span 和 div span 的区别 ,即有箭头和没箭头的区别 div > span span 是 div 的下一层级关系 在这种情况下找得到span元素: <div& ...

  6. AngularJS with MVC4 CRUD

    CRUD using MVC Web API and AngularJS In this article I am going to demonstrate about how can we crea ...

  7. 【暑假】[实用数据结构]UVa11235 Frequent values

    UVa 11235 Frequent values Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 11241   Accep ...

  8. Clean Code – Chapter 2: Meaningful Names

    Use Intention-Revealing Names The name should tell you why it exists, what it does, and how it is us ...

  9. C# 调用Dll 传递字符串指针参(转)

    http://www.cnblogs.com/jxsoft/archive/2011/07/06/2099061.html

  10. 解决adb问题的方法

    The connection to adb is down,and a server error has occured. 在网上找的那个高端方法根本不管用,来,试试我的方法.. 先装个360手机助手 ...