当前位置:网站首页>网络安全课堂作业
网络安全课堂作业
2022-07-23 23:27:00 【困惑的Z同学】
一,将all改为select权限,并且将 * . *改为指定数据库
1 create user [email protected] identified by ‘123456’; 创建一个密码为haha123的本地haha用户
2 grant select on test.* to ‘xixi’@‘localhost’;使用grant授权
3 show grants for [email protected]; 查看haha的权限
二,page16k修改为8kb:
1,先查看当前页的大小:mysql> SHOW GLOBAL STATUS like ‘Innodb_page_size’;
2,修改页面大小源码:vim /mysql-5.5.25/storage/innobase/include/univ.i
3,mysql> SHOW GLOBAL STATUS like ‘Innodb_page_size’;
三、N叉树的N是否可以人为修改
可以修改
方法:
1、 通过改变 key 值来调整
N 叉树中非叶子节点存放的是索引信息,索引包含 Key 和 Point 指针。Point 指针固定为 6 个字节,假如 Key 为 10 个字节,那么单个索引就是 16 个字节。如果 B + 树中页大小为 16 K,那么一个页就可以存储 1024 个索引,此时 N 就等于 1024。我们通过改变 Key 的大小,就可以改变 N 的值。
2、改变页的大小
页越大,一页存放的索引就越多,N 就越大。
数据页调整后,如果数据页太小层数会太深,数据页太大,加载到内存的时间和单个数据页查询时间会提高,需要达到平衡才行。
四,Truncate和delect区别
相同点:此二者在删除table时都可以实现删除表中所有数据,同时保留表结构。
不同点:
Truncate table ;一旦执行此操作,表数据全部清除.同时,数据是不可回滚的。
Delect form:一旦执行此操作,表数据可以全部清除。同时数据时可以回滚的。
五,substr和substring有何不同
不同点:
Substr:第二个参数截取字符串的长度(从起点截取某个长度的字符窜);
Substring:第二个参数是截取字符串最终的下标(截取2个位置之间的字符串,含头不含尾)\
六,MySQL存储和触发器过程:
存储过程:
1,创建格式:create proceduce 111
2, 包含一个以上代码,代码块使用begin和end之间
3,在命令行中创建需要定义分隔符demlimiter
触发器
1,创建触发器使用create trigger 触发器名称。
2,什么时候触发?
after insert on users,处理after还有before ,是在对表操作之前(before)或者之后(after)触发动作的。
3,对什么操作事件触发?
After insert on users,操作时间包括insert,update,delete
4,对什么表触发?
after insert on users
5,影响的范围?
For each row
触发器:与函数、存储过程一样,触发器是一种对象,它能根据对表的操作事件,触发一些动作,这些动作可以是insert,update,delete等修改操作。
七,严格模式导致mysql5.7创建用户失败,如何解决
修改my.ini(Windows系统)或my.conf(Linux系统)配置文件,以linux系统为例将:sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
修改成:
sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
然后重启mysql服务
service mysql restart
边栏推荐
- As a developer, you have to know the three performance testing tools JMeter, API and jmh user guide
- mysqlbinlog命令介绍(远程拉取binlog日志)
- Merge.Avhd into.Vhd manually in Hyper-V
- 13. Roman to integer
- Finding all paths between two points in a directed graph
- [unity3d daily bug] unity3d solves "the type or namespace name" XXX "cannot be found (are you missing the using directive or assembly reference?)" Etc
- [tensorflow] check whether tensorflow GPU is available
- Mongodb - Introduction to the usage of logical operators not, and, or, nor in query statements
- 二,数字逻辑功能单元
- FreeRTOS personal notes - create / delete dynamic tasks, start scheduler
猜你喜欢
![Is the height of binary tree [log2n]+1 equal to log2 (n+1)](/img/64/381376190218d5b2cdfd8b1197e8f6.png)
Is the height of binary tree [log2n]+1 equal to log2 (n+1)

TAP 系列文章7 | 易于管理的流水线配置

2、 Digital logic functional unit

Structured Streaming 编程模型(Input Table、Result Table、Output Mode...)

USB to can device in nucleic acid extractor high performance USB interface can card

Diabetes genetic risk testing challenge advanced

Redis集群搭建(Cluster 集群模式,分片集群)

DHCP: prevent rogue DHCP server in the network

Lin Zhiying's injury is relatively stable

The role of physical layer, link layer, network layer, transport layer and application layer of tcp/ip model of internet protocol stack
随机推荐
TAP 系列文章8 | TAP 学习中心——通过动手教程来学习
Getting started database days2
Lin Zhiying's injury is relatively stable
Android金九银十的面试你准备的怎么样了?最新Android面试真题汇总助你备战
Tensorflow one layer neural network training handwritten digit recognition
Interviewer: if the order is not paid within 30 minutes after it is generated, it will be automatically cancelled. How to realize it?
2、 Digital logic functional unit
Software architecture
Tap series article 6 | application model of tap
Baidu editor uploads pictures and sets custom directories
dried food! Implicit sparse regularization effect in neural networks
strncat() strncmp()
Contemporary inspirational "women"
Matlab Foundation
在openEuler社区开源的Embedded SIG,来聊聊它的多 OS 混合部署框架
TAP 系列文章5 | 云原生构建服务
Learning MySQL is enough
System memory introduction and memory management
FreeRTOS personal notes - suspend / unhook tasks
FreeRTOS personal notes - create / delete dynamic tasks, start scheduler