mysql
yy1209357299
这个作者很懒,什么都没留下…
展开
-
linux+mysql+mysqldump定时备份数据库
linux+mysql+mysqldump定时备份数据库原创 2023-03-17 14:08:55 · 147 阅读 · 1 评论 -
PowerDesigner 连接MySQL数据库详细步骤
PowerDesigner 连接MySQL数据库详细步骤原创 2023-03-01 13:47:22 · 6819 阅读 · 3 评论 -
记一次mysql中文变?乱码问题
1、查看数据库编码show variables like ‘%character%’;2、查看建数据库的编码SHOW CREATE DATABASE db_name;3、查看建表的编码SHOW CREATE TABLE tbl_name;4、查看列的编码SHOW FULL COLUMNS FROM tbl_name;5、查看jdbc连接是否设置utf8编码characterEncoding=UTF-8&useUnicode=true...原创 2022-04-13 18:46:48 · 694 阅读 · 0 评论 -
springcloud gateway结合mysql+redis实现动态路由
1、数据库脚本和pommysql 8版本/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 80019 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL原创 2021-12-02 17:22:53 · 1491 阅读 · 0 评论 -
springboot 原生jdbc进行MYSQL数据库的连接
1、pom <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> <dependency>原创 2021-12-02 17:10:18 · 281 阅读 · 0 评论 -
For Windows-based platforms, see Microsoft Knowledge Base Article 196271 (Q196271).
报错如下:The driver was unable to create a connection due to an inability to establish the client portion of a socket.This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.For Unix-bas原创 2021-08-24 15:17:03 · 1479 阅读 · 0 评论 -
mysql存储过程——springboot查询优化
存储过程简介SQL语句需要先编译然后执行,而存储过程(Stored Procedure)是一组为了完成特定功能的SQL语句集,经编译后存储在数据库中,用户通过指定存储过程的名字并给定参数(如果该存储过程带有参数)来调用执行它。存储过程是可编程的函数,在数据库中创建并保存,可以由SQL语句和控制结构组成。当想要在不同的应用程序或平台上执行相同的函数,或者封装特定功能时,存储过程是非常有用的。数据库中的存储过程可以看做是对编程中面向对象方法的模拟,它允许控制数据的访问方式。简单理解,MySQL 存储过程是原创 2021-04-07 18:47:16 · 509 阅读 · 0 评论 -
Navicat连接mysql8.0.1版本出现1251--Client does not support authentication protocol requested by server的解决
1、登录mysql -u root -p2、查看用户select host,user,plugin,authentication_string from mysql.user3、更改加密方式mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;4、修改密码mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH my原创 2021-03-19 15:27:20 · 84 阅读 · 0 评论 -
sql 查询优化排坑not in/not exists/left on
in/existsin是把外表和内表作hash连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询,一直以来认为exists比in效率高的说法是不准确的。如果查询的两个表大小相当,那么用in和exists差别不大;如果两个表中一个较小一个较大,则子查询表大的用exists,子查询表小的用innot in/not exist用not exists都比not in 要好,前者用索引,后者要全盘扫描联合查询连接查询包括:1、自连接(join 等同于inner joi..原创 2021-03-10 16:18:07 · 333 阅读 · 0 评论 -
sql date_format用法
select date_format(now(),’%Y-%m-%d %H:%i:%s’)对时间进行加减运算加运算 1负运算 -1SELECT date_format(date_add(CURRENT_TIMESTAMP(),interval 1 YEAR),’%Y-%m-%d %H:%i:%s’) a,date_format(date_add(CURRENT_TIMESTAMP(),interval 1 MONTH),’%Y-%m-%d %H:%i:%s’) b,date_format(d原创 2020-11-04 13:41:04 · 5152 阅读 · 0 评论 -
mysql 求差集
1、except要求a,b两个表结构一致select * from aexceptselect * from b2、not inselect id from awhere a.id not in (select id from b)3、分组取最大值select a,max(b) from c group by a原创 2020-11-03 18:57:29 · 591 阅读 · 0 评论 -
linux安装mysql8
清理原来mysql数据rpm -qa | grep mariadb查看是否存在mariadb,若存在,则使用rpm -e 文件名 --nodeps卸载软件。rpm -qa|grep mysql查看是否已经安装mysql,如果已经安装则使用命令rpm -e 文件名 --nodeps卸载软件。find / -name mysql /etc/logrotate.d/mysql...原创 2019-11-12 09:33:22 · 101 阅读 · 0 评论 -
sql按月份查询统计每一天特定时间的数据
方法一SELECT *FROM TB_CONSUME_TRADE_UD WHERE DATE_FORMAT(STR_TO_DATE(TRADE_TIME,"%Y%m%d%H%i%s"), '%H%i%s') BETWEEN "070000" AND "1930000"AND TRADE_TIME BETWEEN "20190618000000" AND "2019061900000...原创 2019-06-19 16:32:16 · 3587 阅读 · 2 评论 -
mysql 1366 incorrect string value错误
mysql 1366 incorrect string value 出现错误是插入不了中文需要修改该字段的属性设置字符集和排序规则如下图原创 2019-03-19 11:20:59 · 1030 阅读 · 0 评论