随笔分类 - Mysql
摘要:部署MySQL-proxy 先安装lua # 下载依赖 yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel* libmcrypt* libtool* flex* pkgconfig* libeven
阅读全文
摘要:Windows下安装Mysql5.7.34(zip方式) 点击下载MySQL5.7.34 配置文件my.ini [mysqld] #shared-memory #skip-grant-tables sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZER
阅读全文
摘要:-- 索引语法 # 创建索引 create table tb_1( id int primary key comment 'ID' auto_increment , name varchar(20) , salary int default 3000 ) ; insert into tb_1(nam
阅读全文
摘要:create table tableA ( id int primary key , name varchar(20) ) ; create table tableB( id int primary key , name varchar(20) , tableA_id int ) ; insert
阅读全文
摘要:1 use learn_db; 2 3 # 排序查询 4 /* 5 select + 字段名/*(多个字段名用逗号隔开) from + 表名 order by + 要排序的字段名 6 order by + 字段名 [asc | desc] 7 order by 默认为升序 8 order by +
阅读全文
摘要:1 use learn_db ; 2 3 # 创建主表 4 create table class_teachers( 5 id int primary key auto_increment not null comment '班主任ID', 6 name varchar(20) not null c
阅读全文
摘要:1 use learn_db ; 2 3 # 查询所有字段已经信息 select * from + 表名 4 select * from people ; 5 6 # 增 7 # 添加数据 8 /* 9 insert into + 表名(要增加的字段名) values(对应字段的数据) 10 ins
阅读全文
摘要:1 create table dis_exam( 2 id int primary key auto_increment not null , 3 student_name varchar(20) not null , 4 exam_python double default 0 , 5 exam_
阅读全文
摘要:1 # 查看数据时间 2 select now() ; 3 4 # 查询mysql版本 5 select version() ; 6 7 # 查看所有库 show + 库名 8 show databases ; 9 10 # 查看库的创建信息 show create + 库名 11 show cre
阅读全文
摘要:mysql的主从热备份 Server version: 5.7.22-log OS: master(windows10企业版20H2)-->slave(windows10企业版LTSC1809) mysql的权限及必要点 1,任意ip可以连接2个数据库 -->>grant all on *.* t
阅读全文

浙公网安备 33010602011771号