随笔分类 -  Mysql

摘要:部署MySQL-proxy 先安装lua # 下载依赖 yum -y install gcc* gcc-c++* autoconf* automake* zlib* libxml* ncurses-devel* libmcrypt* libtool* flex* pkgconfig* libeven 阅读全文
posted @ 2021-11-24 22:54 关于段主任的一切 阅读(122) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-09-06 18:50 关于段主任的一切 阅读(511) 评论(0) 推荐(0)
摘要:-- 索引语法 # 创建索引 create table tb_1( id int primary key comment 'ID' auto_increment , name varchar(20) , salary int default 3000 ) ; insert into tb_1(nam 阅读全文
posted @ 2021-08-13 11:41 关于段主任的一切 阅读(169) 评论(0) 推荐(0)
摘要:create table tableA ( id int primary key , name varchar(20) ) ; create table tableB( id int primary key , name varchar(20) , tableA_id int ) ; insert 阅读全文
posted @ 2021-08-13 11:39 关于段主任的一切 阅读(67) 评论(0) 推荐(0)
摘要:1 use learn_db; 2 3 # 排序查询 4 /* 5 select + 字段名/*(多个字段名用逗号隔开) from + 表名 order by + 要排序的字段名 6 order by + 字段名 [asc | desc] 7 order by 默认为升序 8 order by + 阅读全文
posted @ 2021-07-27 21:52 关于段主任的一切 阅读(59) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-07-27 21:52 关于段主任的一切 阅读(69) 评论(0) 推荐(0)
摘要:1 use learn_db ; 2 3 # 查询所有字段已经信息 select * from + 表名 4 select * from people ; 5 6 # 增 7 # 添加数据 8 /* 9 insert into + 表名(要增加的字段名) values(对应字段的数据) 10 ins 阅读全文
posted @ 2021-07-27 21:51 关于段主任的一切 阅读(76) 评论(0) 推荐(0)
摘要: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_ 阅读全文
posted @ 2021-07-27 21:51 关于段主任的一切 阅读(70) 评论(0) 推荐(0)
摘要:1 # 查看数据时间 2 select now() ; 3 4 # 查询mysql版本 5 select version() ; 6 7 # 查看所有库 show + 库名 8 show databases ; 9 10 # 查看库的创建信息 show create + 库名 11 show cre 阅读全文
posted @ 2021-07-27 21:50 关于段主任的一切 阅读(73) 评论(0) 推荐(0)
摘要:mysql的主从热备份 Server version: 5.7.22-log OS: master(windows10企业版20H2)-->slave(windows10企业版LTSC1809) mysql的权限及必要点 1,任意ip可以连接2个数据库 -->>​grant all on *.* t 阅读全文
posted @ 2021-07-13 16:35 关于段主任的一切 阅读(187) 评论(0) 推荐(0)