Wake Me Up When September Ends.

A wanderer capable of grasping the beauty of the grass, with a heart full of ancient charm, and a fondness for playful wit. Those who understand my words are knowledgeable individuals; those who decipher my code truly comprehend the essence. I am a wandering code swordsman, carrying my skills and riding freely through the digital world.

解决

在日常使用mysqldump进行数据备份时,会出现如下的问题:

1
2
3
4
5
6
7
8
9
mysqldump -h ***  -u root -p --skip-lock-tables mig_test > /var/log/mysql/bak.sql
Enter password:
#输入密码之后报如下错误:
mysqldump: Couldn't execute 'SELECT COLUMN_NAME,
JSON_EXTRACT(HISTOGRAM, '$."number-of-buckets-specified"')
FROM information_schema.COLUMN_STATISTICS
WHERE SCHEMA_NAME = 'mig_test' AND TABLE_NAME = 'migrations';':

Unknown table 'COLUMN_STATISTICS' in information_schema (1109)

经查阅相关资料得知,需要添加--column-statistics=0即可。我猜测的原因可能是备份数据时候在读取相关表结构没有相关权限,所以报此错误。通过添加--column-statistics=0进行关闭,以免报错。

阅读全文 »

[方式一] 配置ssh实现免密登录

本地需要安装OpenSS扩展

第一步 通过终端生成rsa key

1
ssh-keygen -t rsa -C "your_email@example.com"  

your_email@example.com 是你自己的邮箱域名,该命令一路回车,生成一对rsa密钥并将电子邮件地址设置为your_email@example.com,你git仓库使用的邮箱与此对应。

第二步 git中设置密钥

1
git config --global core.sshCommand "openssh-client -o StrictHostKeyChecking=no -i /path/to/your/key.pem"  
阅读全文 »

1. 查看所有本地分支

1
git branch

2. 删除本地分支

1
git branch -D branch_name

其中,branch_name为要删除的分支名称。

3. 查看所有远程分支

1
git branch -r

4. 删除远程分支

1
git push origin --delete branch_name
阅读全文 »