上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 55 下一页
摘要: --init-command=name SQL command to execute when connecting to MySQL server可用于导入数据时,关闭二进制日志 select connection_id(); 阅读全文
posted @ 2021-01-19 18:00 ascertain 阅读(60) 评论(0) 推荐(0) 编辑
摘要: binlog=statement binlog是在事务提交时才进行fsync刷盘,刷盘操作耗费IO,statement只需要一条语句,而不是所有操作过的数据行可能造成主从不一致 阅读全文
posted @ 2021-01-19 17:58 ascertain 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 主从高延迟: 网络延迟 max_allowed_packet auto_increment_increment auto_increment_offset sync_binlog=1 innodb_flush_log_at_trx_commit 事务长时间没有提交 大表的DDL 复制错误 串行执行大 阅读全文
posted @ 2021-01-15 18:22 ascertain 阅读(139) 评论(0) 推荐(0) 编辑
摘要: caching_sha2_password 加密串 mysql_native_password加密串 阅读全文
posted @ 2021-01-14 16:50 ascertain 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 统计某一数据库中所有表的记录数 select table_name,table_rows from `information_schema`.tables where table_schema=`db_name`; sql_mode中含有only_full_group_by 且 没使用group b 阅读全文
posted @ 2021-01-13 18:11 ascertain 阅读(213) 评论(0) 推荐(0) 编辑
摘要: yum install nfs-utils rpcbind /etc/exports /www 192.168.1.0/24(rw) 172.16.0.0/12(ro) *(ro) 常用目录和命令 /etc/exports NFS服务的主要配置文件 /usr/sbin/exportfs NFS服务的 阅读全文
posted @ 2021-01-12 17:57 ascertain 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Python内置的json模块提供了非常完善的Python对象到JSON格式的转换。 json.dumps() 将Python中的对象转换为JSON中的字符串对象json.loads() 将JSON中的字符串对象转换为Python中的对象 通过一种简单的方式,用lambda方式来转换任意一个类对象为 阅读全文
posted @ 2021-01-11 15:29 ascertain 阅读(875) 评论(0) 推荐(0) 编辑
摘要: Linux系统下,使用默认用户root。远程target机器的主目录下有个脚本test.sh,可执行权限,内容只有一条命令:sleep 10 在本地机器上执行 ssh target "nohup ./test.sh &",结果ssh不立即退出,等test.sh执行完毕之后才退出。一般我们使用nohu 阅读全文
posted @ 2021-01-08 12:05 ascertain 阅读(1050) 评论(0) 推荐(0) 编辑
摘要: SSHFS(Secure Shell FileSystem),可以让我们通过ssh的SFTP挂载远程的目录至本机 使用 -o指定选项,可指定mount的挂载选项 -o nonempty 可挂载于非空目录 -o reconnect reconnect to server -o allow_other 阅读全文
posted @ 2021-01-07 18:52 ascertain 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-01-07 17:35 ascertain 阅读(690) 评论(0) 推荐(0) 编辑
摘要: https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html 一、 /* .... */ 在大部分语言中都一样是注释。这个之中的语句是不被执行的。 但MYSQL中 为了保持兼容,比如从mysqldump 导出的SQL语句能被其它数据库直接使 阅读全文
posted @ 2021-01-07 15:34 ascertain 阅读(551) 评论(0) 推荐(0) 编辑
摘要: // var a=222; a=222; function f(){ console.log(a); a=33; } f(); console.log(a) var a=222; // a=222; function f(a){ console.log(a); a=33; } f(); consol 阅读全文
posted @ 2021-01-06 11:48 ascertain 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 新购买VPS云服务器后常用VPS测试脚本代码:跑分看看你的VPS综合性能。综合测试VPS硬件信息、CPU,核cores,CPU性能跑分,内存,硬盘大小,硬盘I/O speed、speedtest,国内国外下载速度Download Speed和网络延迟,Trace去程回程路由,一键开启BBR等等的测试 阅读全文
posted @ 2021-01-05 11:37 ascertain 阅读(639) 评论(0) 推荐(0) 编辑
摘要: log_timestamps 设置日志的时间戳,默认UTC,修改为system,必须写入配置文件 log_timestamps=system 阅读全文
posted @ 2021-01-05 10:59 ascertain 阅读(79) 评论(0) 推荐(0) 编辑
摘要: log_bin设定binlog的文件名前缀和路径,设置off并不能关闭binlog max_binlog_size设定binlog的最大容量 max_binlog_size=100K max_binlog_size=100M max_binlog_size=1G 查看当前的二进制文件及其positi 阅读全文
posted @ 2021-01-04 18:52 ascertain 阅读(220) 评论(0) 推荐(0) 编辑
摘要: mysqlbinlog是二进制日志查看工具,其也会读取/etc/my.cnf中 [client] 段的配置,但是不识别编码 解决方法: 将[client]中 default_character_set=utf8mb4注释 加入 --no-defaults参数 mysqlbinlog --no-def 阅读全文
posted @ 2021-01-04 16:57 ascertain 阅读(912) 评论(0) 推荐(0) 编辑
摘要: unicode字符的不同表示法 unicode字符在html、css和js中的表示方法均不相同,下面分别作介绍。 原文发表于这里 1.1. css表示法 首先来一段很常见的bootstrap的字体图标代码: .glyphicon-home:before { content: "\e021"; } 上 阅读全文
posted @ 2021-01-04 14:30 ascertain 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 利用除法Or取模缩小范围 var b=98; switch(parseInt(b/10)){ case 10: console.log('full'); break; case 9: case 8: case 7: case 6: console.log('qualified'); break; d 阅读全文
posted @ 2021-01-04 10:23 ascertain 阅读(68) 评论(0) 推荐(0) 编辑
摘要: https://www.unicode.org/Public/UCD/latest/charts 阅读全文
posted @ 2021-01-03 22:01 ascertain 阅读(889) 评论(0) 推荐(0) 编辑
摘要: 首先要知道,div是块级元素,在页面中独占一行,自上而下排列,也就是传说中的流。如下图: 可以看出,即使div1的宽度很小,页面中一行可以容下div1和div2,div2也不会排在div1后边,因为div元素是独占一行的。 注意,以上这些理论,是指标准流中的div。 小菜认为,无论多么复杂的布局,其 阅读全文
posted @ 2021-01-02 23:22 ascertain 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 55 下一页