当前位置:网站首页>网络安全课堂作业
网络安全课堂作业
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
边栏推荐
- Flask框架中如何进行数据库的迁移
- 2、 Digital logic functional unit
- [laser principle and Application-8]: EMC design of laser circuit
- What is the difference between go run, go build and go install
- Stm32mp1 M4 bare metal cubeide Development Guide Chapter 6 stm32cube firmware package
- None and Nan, Nan, Nan
- TAP 系列文章5 | 云原生构建服务
- Resolved (selenium operation Firefox Firefox browser error) attributeerror: 'webdriver' object has no attribute 'execute_ cdp_ cmd’
- Lin Zhiying's injury is relatively stable
- Leetcode: palindrome number
猜你喜欢

How does the easynvr platform turn off anonymous login?

二,数字逻辑功能单元

1、 Simplification of digital logic

Lin Zhiying's injury is relatively stable

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

2、 Digital logic functional unit

Raspberry pie SSH login

strncat() strncmp()

Stm32mp1 M4 bare metal cubeide Development Guide Chapter 6 stm32cube firmware package

H7-tool serial port offline burning operation instructions, support TTL serial port, RS232 and RS485 (2022-06-30)
随机推荐
STM32F4查看系统各部分频率
史上最全的2022年版Android面试题
strncat() strncmp()
Stm32mp1 M4 bare metal cubeide Development Guide Chapter 6 stm32cube firmware package
Stm32f4 check the frequency of each part of the system
Tap series article 4 | backstage based tap developer portal
BGP basic experiment
浅析基于NVR技术的视频能力与未来发展趋势
SecureCRT garbled
Finding all paths between two points in a directed graph
砺夏行动|源启数字化:既有模式,还是开源创新?
[web vulnerability exploration] SQL injection vulnerability
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
Flask框架中如何进行数据库的迁移
ArraysList 与顺序表 ——模拟实现
在openEuler社区开源的Embedded SIG,来聊聊它的多 OS 混合部署框架
USB Foundation
Lu Xia action | Source Kai Digital: Existing Mode or open source innovation?
Mongodb - Introduction to the usage of logical operators not, and, or, nor in query statements
Tap series article 5 | cloud native build service