![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
甘苦
这个作者很懒,什么都没留下…
展开
-
连接数据库时区设置
Jdbc连接数据库时区设置原创 2022-06-29 11:09:31 · 1128 阅读 · 0 评论 -
mysql时间计算函数
实例:课程学习表课程学习记录的时长存储格式为时分秒"01:02:33",现需要对课程学习进行分组统计并合并计算学习时长初始化表数据-- ------------------------------ Table structure for `course_study`-- ----------------------------DROP TABLE IF EXISTS `course_study`;CREATE TABLE `course_study` ( `id` bigint(2原创 2021-03-03 16:56:50 · 319 阅读 · 1 评论 -
Linux环境Mysql大小写敏感-不生效
第一步:Linux下查看mysql默认采用的配置文件[root@localhost init.d]# mysql --help | grep 'Default options' -A 1Default options are read from the following files in the given order:/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf从左至右依次加载,如果存在则加载引用,否则,.原创 2020-09-04 16:26:30 · 1134 阅读 · 0 评论 -
查询mysql数据库表结构及字段注释
查询mysql数据库表结构及字段注释SELECT column_name, column_comment, column_type, column_key FROM INFORMATION_SCHEMA.ColumnsWHERE table_name = 'lift' AND table_schema = 'pro_callcenter'原创 2020-08-12 11:08:18 · 575 阅读 · 0 评论 -
分布式分库mybatis update批处理之 Parameter '__frch_item_0' notfound
mybatis批量更新至少有两种处理方式: <update id="updateDeviceByBatch" parameterType="java.util.List"> <foreach collection="thirdOrgIds" item="screen" index="index" separator=";" > ...原创 2020-02-17 12:03:36 · 417 阅读 · 0 评论 -
MySQL经纬度距离查询
在实际需求中,会有按某一坐标点查询其指定范围内的符合条件的数据,数据库中记录了数据的经纬度,在给出某一点位之后,需要我们动态计算其与其它信息的距离,然后筛选。一个实例SQL如下:注意:其中point字段类型为 point(mysql 5.6.1增加了对空间数据支持功能,新增了st_*相关函数,可计算两个地理坐标点的距离)参数:经度112.5590670000000000 ...原创 2020-02-05 12:06:19 · 1580 阅读 · 0 评论 -
mysql连接错误 springboot yml java.sql.SQLException: com.mysql.jdbc.Driver
在springboot中配置yml文件时,配置了数据库mysql的连接,结果启动报错:java.sql.SQLException: com.mysql.jdbc.Driverorg.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is...原创 2020-01-10 13:44:52 · 1454 阅读 · 0 评论 -
mysql日期0000-00-00 00:00:00转化异常
ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframewor...原创 2019-09-18 17:37:59 · 563 阅读 · 0 评论 -
mysql下创建用户并授权
记录一下简单的创建命令create user 'mobiledb'@'%' identified by '!m0Bi1EdB^';grant select,insert,update,delete,create,drop,alter on cs.* to mobiledb@'%' identified by '!m0Bi1EdB^';flush privileges;...原创 2019-06-21 17:01:55 · 75 阅读 · 0 评论 -
java使用mybatis报错之Mysql查询表字段带关键字
HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:typeException reportmessageRequest processing failed; nested exception is org.spr...原创 2019-03-27 16:28:01 · 1893 阅读 · 0 评论