有些没节操的package不遵循规范,小版本改动不兼容导致线上bug,google的grpc就被吐槽过,这里将依赖设置成测试过的稳定版本可以减少依赖的package不兼容变更带来的问题. go get -u 解决依赖时可能改动项目中其他的package的版本,固定版本号也可以减少意外的版本变更,例如:这里升级gorm的版本也会改动mysql的版本.
Options: -c, --connections <N> Connections to keep open //连接数 -d, --duration <T> Duration of test //测试时间 -t, --threads <N> Number of threads to use //线程数
-s, --script <S> Load Lua script file //lua脚本 -H, --header <H> Add header to request //添加头信息 --latency Print latency statistics --timeout <T> Socket/request timeout -v, --version Print version details //版本信息 Numeric arguments may include a SI unit (1k, 1M, 1G) Time arguments may include a time unit (2s, 2m, 2h)
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
where some-mysql is the name you want to assign to your container, my-secret-pw is the password to be set for the MySQL root user and tag is the tag specifying the MySQL version you want. See the list above for relevant tags.
1
docker run --name docker_mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=your_password -d mysql
修改验证密码,修改后才能用root@密码登陆
1
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'your_password';
通过秘钥ssh到服务器,配置并连接过服务器,更换秘钥后无法连接,报错. 此时需要通过 ssh-keygen -R 服务器ip 删除记录,更换密钥后需要删除信息,不然无法使用新密钥登录 -R命令作用:Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts (see the -H option above).