
database
数据库相关
pp_lan
这个作者很懒,什么都没留下…
展开
-
使用Mysql实现Postgresql中窗口函数row_number的功能
mysql实现postgresql窗口函数row_number的功能原创 2024-01-30 10:18:53 · 893 阅读 · 0 评论 -
Druid连接池工具公式化SQL附踩坑记录
druid连接池使用及踩坑记录原创 2024-01-15 17:11:56 · 806 阅读 · 0 评论 -
Springboot集成Flyway(适用于多数据源)
springboot使用API方式灵活对接flyway原创 2022-12-16 14:11:12 · 4328 阅读 · 0 评论 -
Mysql触发器使用实例
mysql触发器简单使用,记录用户表的数据及更新时间。原创 2023-02-09 11:43:18 · 455 阅读 · 0 评论 -
Postgresql触发器使用实例
Postgresql使用实例原创 2023-02-08 16:57:20 · 2444 阅读 · 0 评论 -
Mysql修改用户及密码
mysql中root用户误删,重新添加及赋权操作记录原创 2023-01-31 15:11:43 · 174 阅读 · 0 评论 -
CenterOs8下Redis-5.0.14安装过程记录
linux环境下redis安装启动柜过程记录原创 2022-12-01 16:03:30 · 435 阅读 · 0 评论 -
PowerDesinger导出模板定义(转载)
PowerDesigner导出的模板需要自定义才能符合我们需要的格式,本文记录了如何自定义模板转载 2022-09-09 09:35:55 · 300 阅读 · 0 评论 -
Postgresql启动失败之 could not map anonymous shared memory: Cannot allocate memory
现象启动报错waiting for server to start....2022-03-11 16:52:05.485 CST [56148] LOG: starting PostgreSQL 12.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit2022-03-11 16:52:05.485 CST [56148] LOG: listening on IPv4原创 2022-03-11 17:32:11 · 3004 阅读 · 0 评论 -
centos安装mysql8.0
准备安装包 1. 打开mysql的官网,MySQL :: Download MySQL Community Server 如下图 2. 选择对应的版本.转载 2022-01-01 21:03:52 · 1065 阅读 · 0 评论 -
模糊查询or导致索引失效
表结构-- ------------------------------ Table structure for t_test-- ----------------------------DROP TABLE IF EXISTS "public"."t_test";CREATE TABLE "public"."t_test" ( "id" int4 NOT NULL, "name" varchar(50) COLLATE "pg_catalog"."default", "desc"原创 2021-10-26 20:37:16 · 956 阅读 · 4 评论 -
Sql案例整理-注入
Sql注入示例为了说明项目中的sql注入,此处以mybatis为例package com.fiberhome.base;import com.fiberhome.base.dao.TUserMapper;import com.fiberhome.base.model.User;import org.junit.Assert;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.te原创 2021-09-08 15:00:28 · 578 阅读 · 0 评论 -
Sql案例整理-排序分页BUG
排序分页BUG测试数据/* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : PostgreSQL Source Server Version : 120007 Source Host : localhost:5432 Source Catalog : test Source Schema : public Target S原创 2021-09-08 14:57:14 · 295 阅读 · 0 评论 -
postgresql地图查询(判断点是否在多边形内)
点位在多边形内判断sql:select name, lng, lat from zd where point(lng, lat) <@ polygon(path('(( 118.22342, 23.1299494 ), (119.292001, 29.993993), (118.44520992, 25.1320021))'));如果lng, lat存的为字符串,则需要转为数值类型,例如:to_number(lng, '999.99999999')更多运算参考:..原创 2020-11-17 11:05:29 · 5025 阅读 · 2 评论 -
数据库事务及隔离级别
数据库事务4种隔离级别及7种传播行为(三) </h1> <div class="clear"></div> <div class="postBody"> 一、隔离级别:数据库事务的隔离级别有4个,由低到高依次为Read un...转载 2020-03-27 16:34:51 · 235 阅读 · 0 评论 -
Canal问题归纳
canal问题归纳:1.com.alibaba.otter.canal.parse.exception.CanalParseException: can't find start position for example解决办法://查找meta.dat文件,删除并重启canalfind ./ -name 'meta.dat'./conf/example/meta.dat /...原创 2020-03-11 17:29:49 · 1642 阅读 · 0 评论 -
Mysql索引结构的实现
什么是索引...转载 2020-03-09 10:54:45 · 183 阅读 · 0 评论 -
Mysql安装【linux】
参考链接:https://blog.youkuaiyun.com/qq_37598011/article/details/93489404相关报错记录: FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db: Data::Dumper # 解决方法yu...转载 2020-01-04 15:29:41 · 106 阅读 · 0 评论 -
HIVE周期合数功能
最近需要做一个hive周期合数的功能,考虑了一下,记录一下实现实现。实现思路:使用datax抽取一张临时表c.o_a_l_mytable,用临时表和原表o.o_a_l_mytable进行比对,将需要纠正的数据查询出,发送KAFKA等,统一进行数据Sink。1. INSERT和UPDATE(已验证)-- 获取insert及delete数据select max(rowkey), ma...原创 2019-12-28 16:27:07 · 181 阅读 · 0 评论 -
linux下mysql忘记密码怎么办
前言今天在服务器安装mysql之后,登录发现密码错误,但是我没有设置密码呀,最后百度之后得知,mysql在5.7版本之后会自动创建一个初始密码。报错如下:[root@mytestlnx02 ~]# mysql -u root -pEnter password: ERROR 1045 (28000): Access denied for user 'root'@'localho...转载 2019-11-11 10:22:23 · 233 阅读 · 0 评论 -
类似postgresql的string_agg函数在mysql中怎么用?
聚类函数string_agg在Mysql中可以用GROUP_CONCAT来代替SELECT GROUP_CONCAT(brandId, ":", company) from base_car GROUP BY brandId原创 2019-06-04 14:44:31 · 3999 阅读 · 0 评论 -
Mysql分页数据异常
转载自:https://www.cnblogs.com/thinkingthigh/p/7118343.html Mysql order by与limit混用陷阱 在Mysql中我们常常用order by来进行排序,使用limit来进行分页,当需要先排序后分页时我们往往使用类似的写法select * from 表名 order by 排序字段 ...转载 2019-07-22 14:13:40 · 283 阅读 · 0 评论