先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新软件测试全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注软件测试)
正文
row
in
set
(0.00
sec)
|
To grant all privileges to the super@localhost user account, you use the following statement.Note that USAGE
privilege means no privileges in MySQL.
GRANTALLON*.*TO’super’@'localhost’WITH GRANT OPTION;、//赋予本地super用户超级权限(含grant)
The
权限包含有:
SELECT /INSERT /UPDATE / DELETE / DROP / CREATE / CREATE USER / ALTER / ALTER ROUTINE (使用alter procedure和drop procedure) / CREATE ROUTINE (使用create procedure) / CREATE
TEMPORARY TABLES (使用create temporary table)/ CREATE VIEW / EXECUTE (使用call和存储过程) / EVENT / FILE (使用select into outfile 和 load data infile) / GRANT OPTION (可以使用grant和revoke) / ALL / ALL PRIVILEGES / INDEX (可以使用create index和drop index) / LOCK TABLES (锁表) / PROCESS (使用show full processlist) / RELOAD (使用flush) / REPLICATION CLIENT (服务器位置访问) / REPLICATION SLAVE (由复制从属使用) / SHOW DATABASES / SHOW VIEW / SHUT DOWN (使用mysqladmin shutdown 来关闭mysql)/ SUPER / USAGE (无访问权限)
ALL PRIVILEGES; //等同于All
数据对象:
*.* 所有库和所有表。
databaseName.* 某个库中的所有表
databaseName.tableName 某个库中某个表
设置权限时必须给出一下信息
1,要授予的权限
2,被授予访问权限的数据库或表
3,用户名(及主机?有时候无需主机也可以)
grant和revoke可以在几个层次上控制访问权限
1,整个服务器,使用 grant ALL 和revoke ALL
2,整个数据库,使用on database.*
3,特点表,使用on database.table
4,特定的列
5,特定的存储过程
user表中host列的值的意义
%
匹配所有主机
localhost
localhost不会被解析成IP地址,直接通过UNIXsocket连接
127.0.0.1
会通过TCP/IP协议连接,并且只能在本机访问;
::1
::1就是兼容支持ipv6的,表示同ipv4的127.0.0.1
使用案例:
grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利。
grant select, insert, update, delete on testdb.* to common_user@’%’
grant 数据库开发人员,创建表、索引、视图、存储过程、函数。。。等权限。
grant 创建、修改、删除 MySQL 数据表结构权限。
grant create on testdb.* to developer@’192.168.0.%’;
grant alter on testdb.* to developer@’192.168.0.%’;
grant drop on testdb.* to developer@’192.168.0.%’;
grant 操作 MySQL 外键权限。
grant references on testdb.* to developer@’192.168.0.%’;
grant 操作 MySQL 临时表权限。
grant create temporary tables on testdb.* to developer@’192.168.0.%’;
grant 操作 MySQL 索引权限。
grant index on testdb.* to developer@’192.168.0.%’;
grant 操作 MySQL 视图、查看视图源代码 权限。
grant create view on testdb.* to developer@’192.168.0.%’;
grant show view on testdb.* to developer@’192.168.0.%’;
grant 操作 MySQL 存储过程、函数 权限。
grant create routine on testdb.* to developer@’192.168.0.%’; – now, can show procedure status
grant alter routine on testdb.* to developer@’192.168.0.%’; – now, you can drop a procedure
grant execute on testdb.* to developer@’192.168.0.%’;
grant 作用在整个 MySQL 服务器上:
grant select on *.* to dba@localhost; – dba 可以查询 MySQL 中所有数据库中的表。
grant all on *.* to dba@localhost; – dba 可以管理 MySQL 中的所有数据库
grant 作用在单个数据库上:
grant select on testdb.* to dba@localhost; – dba 可以查询 testdb 中的表。
grant 作用在单个数据表上:
grant select, insert, update, delete on testdb.orders to dba@localhost;
grant 作用在表中的列上:
grant select(id, se, rank) on testdb.apache_log to dba@localhost;
grant 作用在存储过程、函数上:
grant execute on procedure testdb.pr_add to ’dba’@’localhost’
grant execute on function testdb.fn_add to ’dba’@’localhost’
注意:修改完权限以后 一定要刷新服务,或者重启服务,刷新服务用:FLUSH PRIVILEGES。
同理:revoke英文文档如下:
Introduction to the MySQL REVOKE Statement
In order to revoke privileges from a user account, you use the MySQL REVOKE
statement. MySQL allows you to revoke one or more privileges or all privileges from a user.
The following illustrates the syntax of revoking specific privileges from a user:
1
2
3
4
|
REVOKE
privilege_type
[(column_list)]
[,
priv_type
[(column_list)]]…
ON
[object_type]
privilege_level
FROM
user
[,
user]…
|
Let’s examine the MySQL REVOKE statement in more detail.
- First, specify a list of privileges that you want to revoke from a user right after the
REVOKE
keyword. You need to separate privileges by commas. - Second, specify the privilege level at which privileges is revoked in the
ON
clause . - Third, specify the user account that you want to revoke the privileges in the
FROM
clause.
Note that to revoke privileges from a user account, you must have GRANT OPTION
privilege and the privileges that you are revoking.
To revoke all privileges from a user, you use the following form of the REVOKE statement:
1
|
REVOKE ALL PRIVILEGES,
GRANT OPTION
FROM
user
[,
user]…
|
To execute the REVOKE ALL
statement , you must have the global CREATE USER
privilege or the UPDATE
privilege for the mysql database.
To revoke proxy user, you use the REVOKE PROXY
command as follows:
1
|
REVOKE PROXY ON
user
FROM
user
[,
user]…
|
A proxy user is a valid user in MySQL who can impersonate another user, therefore, the proxy user has all privileges of the user that it impersonates.
Before revoking privileges of a user, it is good practice to check if the user has the privileges by using theSHOW GRANTS
statement as follows:
1
|
SHOW
GRANTS
FOR
user;
|
使用案例:
//查看rfc用户的权限
SHOWGRANTSFORrfc;
//MySQL返回如下结果:
GRANTSELECT,UPDATE,DELETEON’classicmodels’.*TO’rfc’@‘%’
//为rfc用户指定密码
CREATE USERIF EXISTSrfcIDENTIFIED BY’dolphin’;
//授权
GRANTSELECT,UPDATE,DELETEON classicmodels.*TOrfc;
//解除 rfc用户的更新、删除权限
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
‘rfc’@‘%’
//为rfc用户指定密码
CREATE USERIF EXISTSrfcIDENTIFIED BY’dolphin’;
//授权
GRANTSELECT,UPDATE,DELETEON classicmodels.*TOrfc;
//解除 rfc用户的更新、删除权限
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
[外链图片转存中…(img-dRcKHZRo-1713146632002)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!