当前位置:网站首页>网络安全课堂作业
网络安全课堂作业
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
边栏推荐
- BGP routing, MPLS
- TOPSIS method (matlab)
- Mobile, telecom and Unicom: fancy solution of 5g to B
- [laser principle and Application-8]: EMC design of laser circuit
- Tap series article 4 | backstage based tap developer portal
- About: enable delivery optimization in enterprise LAN
- Matlab Foundation
- YOLOv4: Optimal Speed and Accuracy of Object Detection
- Contemporary inspirational "women"
- [redis] redis installation and client redis cli use (batch operation)
猜你喜欢

How are you preparing for the Android golden nine silver ten interview? The latest Android Interview Questions Summary helps you prepare for the war

Grey correlation analysis (matlab)

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

难怪国内企业ERP应用效果普遍不理想

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

Mongodb - Introduction to the usage of logical operators not, and, or, nor in query statements

1000 okaleido tiger launched binance NFT, triggering a rush to buy

Preparation for raspberry pie 3B serial port login

【Error】TypeError: expected str, bytes or os. PathLike object, not int
![[web vulnerability exploration] SQL injection vulnerability](/img/94/dc84d7790d5a1823e4b73d513e86be.png)
[web vulnerability exploration] SQL injection vulnerability
随机推荐
汇编语言伪指令详解(附实例)
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
史上最全的2022年版Android面试题
Internet协议栈 TCP/IP模型 物理层、链路层、网络层、传输层、应用层的作用
Raspberry pie SSH login
Tensorflow one layer neural network training handwritten digit recognition
Sql156 average completion rate of each video
Lixia action | Yuanqi Digitalization: existing mode or open source innovation?
难怪国内企业ERP应用效果普遍不理想
一,数字逻辑的化简
【音视频技术】视频质量评价 MSU VQMT & Netflix vmaf
Intel英特尔RealSense实感深度摄像头 自校准(Self-Calibration)操作步骤讲解 D400系列适用
Baidu editor uploads pictures and sets custom directories
TAP 系列文章5 | 云原生构建服务
Redis管道技术/分区
Interface test
Tap series article 6 | application model of tap
J9 number theory: how can we overcome the fomo phenomenon in the digital industry?
Mongodb database + graphical tools download, installation and use
YOLOv4: Optimal Speed and Accuracy of Object Detection