摘要: 一、sql执行的流程 1 mysql客户端发送查询请求到服务器。 2 mysql服务器接收请求并处理,mysql解析器解析查询语句,进行语法分析,确保查询语句符合mysql的语法要求。 3 mysql的查询优化器对sql语句进行优化处理(选择最合适的索引,或使用其它技术来提高性能),生成执行计划。 阅读全文
posted @ 2024-03-04 17:45 江湖凶险 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 一 GET请求 设置headers,user-agent用来模拟浏览器。cookie是远程服务需要校验的认证信息:比如token。 请求:requests.get(url, headers=headers, params=params, verify=False),params是get请求时的for 阅读全文
posted @ 2024-02-28 17:47 江湖凶险 阅读(6) 评论(0) 推荐(0) 编辑
摘要: curl ifconfig.me curl ifconfig.io curl ifconfig.io/all 阅读全文
posted @ 2023-08-29 11:17 江湖凶险 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 创建用户 create user '#user'@'%' identified by "#password"; 其中,%的位置表示是否允许远程访问,若是localhost,则不允许远程访问。 修改账号的密码 alter user '#user'@'%' identified by '#newpass 阅读全文
posted @ 2023-03-15 20:20 江湖凶险 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 在mysql 命令行执行: alter user 'root'@'localhost' identified by "newpassword"; 阅读全文
posted @ 2023-03-15 17:50 江湖凶险 阅读(11) 评论(0) 推荐(0) 编辑
摘要: top 实时查看进程信息,展示进程id,使用内存,占用cpu等信息,可以查看内容占用最多、cpu使用最多的进程,然后再根据进程id查看进程的详细信息。实时更新 ps 瞬时查看进程情况,ps -ef | grep xxx,ps -aux | grep xxx,可以查看进程的jvm参数配置、gc日志等。 阅读全文
posted @ 2023-02-08 20:23 江湖凶险 阅读(317) 评论(0) 推荐(0) 编辑
摘要: alter table xxx auto_increment = 100; 因为设置了列的自增之后,若删除过一些行,下次再新增时还会从已删除的id算起自增,为了让数据看起来连续,可以重新设置自增起始值(当前已有记录的id的最大值) 阅读全文
posted @ 2022-07-20 10:21 江湖凶险 阅读(436) 评论(0) 推荐(0) 编辑
摘要: // 数组定义,初始化 int[] array = new int[]{1, 2, 2, 1}; int[] dest = new int[10]; Integer[] soul = new Integer[]{10,3,1,5}; // 获取子数组 int[] subArray = Arrays. 阅读全文
posted @ 2022-07-05 11:21 江湖凶险 阅读(642) 评论(0) 推荐(0) 编辑
摘要: 1)jdk1.8中list遍历过程中可以直接删除元素了(jdk1.7可以通过倒序遍历删除或iterator遍历删除元素) List<Integer> list = new ArrayList<>(); list.add(0,1); list.add(0,2); list.add(0,3); list 阅读全文
posted @ 2022-06-29 11:20 江湖凶险 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 一 .join(iterator),后面必须是可迭代对象,例如:字符串,列表,元组 testList = ["1","2"] print(",".join(testList)) #输出 1, 2 idStr = "abcedf" print(",".join(idStr)) #输出 a, b, c, 阅读全文
posted @ 2022-06-10 15:58 江湖凶险 阅读(84) 评论(0) 推荐(0) 编辑