随笔分类 - 碎碎念
摘要:1. Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host'
阅读全文
摘要:1. 时间类型转换为字符串类型 now := time.Now() fmt.Println(now.Format("2006-01-02 03:04:05 PM")) yesterday := time.Now().AddDate(0,0,-1).Format("2006-01-02") 2. go
阅读全文
摘要:1. 如何从备份节点读取数据 默认是不允许的,会报如下错误: testReplSet:SECONDARY> show dbs 2016-07-19T10:25:03.196+0800 E QUERY [thread1] Error: listDatabases failed:{ "ok" : 0,
阅读全文
摘要:1. 添加slave时的主从日志 slave的日志 64798:S 12 Jan 13:24:22.483 * SLAVE OF 127.0.0.1:6379 enabled (user request from 'id=2 addr=127.0.0.1:51366 fd=6 name= age=8
阅读全文
摘要:1. 如何修改Mysql的用户密码 mysql> update mysql.user set password=password('hello') where user='root'; mysql> flush privileges; 2. 关于分区数量的限制 Prior to MySQL 5.6.
阅读全文
摘要:1. 如何添加路径 主要有以下两种方式: 1> 临时的 import sys sys.path.append('C:\Users\Victor\Desktop') 2> 永久的 在Linux的配置文件中如/etc/bashrc添加: export PYTHONPATH=$PYTHONPATH:/ho
阅读全文
摘要:1. 字符串如何大小写转换 str="This is a Bash Shell script." 1> tr方式 newstr=`tr '[A-Z]' '[a-z]' <<<"$str"`或者 newstr=$(echo $str |tr '[a-z]' '[A-Z]') 2> typeset ty
阅读全文
摘要:在学习Linux过程中,有许多有用的小技巧。如果放在纸质的笔记本上,平时查阅会相当不方便。现在以一种“碎碎念”的方式,汇集整理在此,目前还不是很多,但随着学习、工作的深入,后续会陆陆续续添加更多的小技巧。
阅读全文