码迷,mamicode.com
首页 > 数据库
2020/7/18 JDBC
一、JDBC概述 JDBC(Java Data Base Connectivity,java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问, 它由一组用Java语言编写的类和接口组成。是Java访问数据库的标准规范 DBC提供了一种基准,据此可以构建更高级的 ...
分类:数据库   时间:2020-07-18 19:49:56    阅读次数:69
Navicat For SQL Server 修改字段为自增主键
Navicat For SQL Server 修改字段为自增主键 [id] int NOT NULL, 修改为: [id] int IDENTITY(1,1) NOT NULL, ...
分类:数据库   时间:2020-07-18 19:46:23    阅读次数:150
使用EFCore执行上下文不存在的SQL语句
using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Reflection; usi ...
分类:数据库   时间:2020-07-18 16:11:44    阅读次数:118
Centos7通过yum安装mysql5.7
参考: https://www.jianshu.com/p/1dab9a4d0d5f https://blog.csdn.net/wohiusdashi/article/details/89358071 安装mysql源 下载 wget https://dev.mysql.com/get/mysql ...
分类:数据库   时间:2020-07-18 16:09:39    阅读次数:100
MYSQL常用操作命令
常用mysql安装命令: 1.解压创建完配置文件BIN目录下初始化:(记录初始化密码) mysqld --initialize --console2.注册mysql服务 mysqld --install mysql3.启动mysql服务 net start mysql4.登陆数据库 mysql -u ...
分类:数据库   时间:2020-07-18 16:06:38    阅读次数:84
MySQL时间类型datetime、bigint及timestamp的查询效率
前期数据准备 通过程序往数据库插入 50w 数据 数据表: CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `time_date` datetime NOT NULL, `time_timestamp` timestamp N ...
分类:数据库   时间:2020-07-18 16:02:17    阅读次数:70
在Windows上安装MySql
下载压缩包 https://downloads.mysql.com/archives/community/ 解压,添加my.ini [mysqld] basedir=C:\\mysql-8.0.19-winx64 datadir=C:\\mysql-8.0.19-winx64\\data defau ...
分类:数据库   时间:2020-07-18 15:56:46    阅读次数:85
sql的书写顺序和执行顺序
很多人会问,sql语句不是挺好写的吗,需要去考虑那么多深的问题干嘛,会写能执行且查出结果就行了,但是,咱们得有着一颗钻研之心去看待问题, 不能只看表面,要多动脑去深层次的思考,以下我就详细把sql的执行顺序总结下来 一、书写顺序 简单拿一条sql语句来示范 SELECT Sno,COUNT(*) 选 ...
分类:数据库   时间:2020-07-18 15:51:38    阅读次数:101
MySQL中的不可见索引、倒序索引
1.不可见索引 create table t12 (i int ,j int ,k int, index i_idx (i) invisible) engine = InnoDB alter table t12 alter index i_idx invisible alter table t12 ...
分类:数据库   时间:2020-07-18 15:38:18    阅读次数:120
Mysql报Too many connections,不要乱用ulimit了,看看如何正确修改进程的最大文件数
#背景 今天在学习mysql时,看到一个案例,大体来说,就是客户端报Too many connections。但是,客户端的连接池,限制为了200,两个客户端java进程,那也才400,然后mysql配置了800的连接。 mysql是在my.cnf中配置了: [root@localhost CAD_ ...
分类:数据库   时间:2020-07-18 15:24:03    阅读次数:103
CentOS7 安装 mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar
一、download and upload to CentOS7 "mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar" 二、install 1 [root@liuhonglei ~]# ls 2 anaconda-ks.cfg easy-mock mysql-8.0. ...
分类:数据库   时间:2020-07-18 13:42:31    阅读次数:313
pymysql 插入数据
import pymysql # 打开数据库连接 db = pymysql.connect("localhost", "root", "123456", "TESTDB" ) # 使用cursor()方法获取操作游标 cursor = db.cursor() # SQL 插入语句 sql = "IN ...
分类:数据库   时间:2020-07-18 13:35:09    阅读次数:170
CentOS7离线安装Mysql8.0
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) 上传到/data/rpm/mysql8.0目录下 因为Mysql依赖于mariadb,所以我们先用rpm -qa | grep mariadb 查找 ...
分类:数据库   时间:2020-07-18 13:32:54    阅读次数:118
Django中创建数据库报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=utf8' at line 1解决方案
一、问题描述 Django中执行create database charset=utf8;命令报错:ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your ...
分类:数据库   时间:2020-07-18 11:39:41    阅读次数:133
md 5 加密 用于向数据库中存储密码
JDK 1.8 版本以上(含) class Md5Pass{ private static String ss="ISMvKXpXpadDiUoOSoAfww=="; public static void main(String[] args) throws UnsupportedEncodingE ...
分类:数据库   时间:2020-07-18 11:37:58    阅读次数:89
关于ORACLE索引的几种扫描方式
恢复内容开始 恢复内容开始 一条sql执行的效率因执行计划的差异而影响,经常说这条sql走索引了,那条sql 全表扫了。索引是怎么走的呢,说说我了解到的几种索引走的方式。 索引的几种扫描方式 1.Index Unique Scans 索引唯一扫描2.Index Range Scans 索引范围扫描3 ...
分类:数据库   时间:2020-07-18 11:32:10    阅读次数:91
Mysql用户权限管理
1. 查看mysql用户 select User,Host,authentication_string from mysql.user; + + + + | User | Host | authentication_string | + + + + | root | localhost | | | ...
分类:数据库   时间:2020-07-18 11:31:53    阅读次数:86
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!