厦门专业做网站公司,集团网站开发多少钱,抖音做我女朋友网站,企业所得税计算1.管理用户
1.查询用户 use mysql ; select * from user ; 2.创建用户 create user 用户名主机名 identified by 密码 ; 例#xff1a;
//创建用户itcast ,只能够在当前主机local host访问#xff0c;密码123456
create user itcastlocalhost identified by 123456;//创建用…1.管理用户
1.查询用户 use mysql ; select * from user ; 2.创建用户 create user 用户名主机名 identified by 密码 ; 例
//创建用户itcast ,只能够在当前主机local host访问密码123456
create user itcastlocalhost identified by 123456;//创建用户itcasts ,可以在任意主机访问该数据库密码123456
create user itcasts% identified by 123456;// %代表任意
3.修改用户密码 alter user 用户名主机名 identified with mysql_native_password by 新密码 ; 例
alter user itcastlocal host identified with mysql_native_password by 12345678 ;
4.删除用户 drop user 用户名主机名 ; 例
drop user itcastlocal host ;
注意
主机名可以用%通配这类SQL开发人员操作的比较少主要是DBADatabase Administrator 数据库管理员使用。 2.权限控制
MySQL中定义了很多种权限但是常用的就以下几种
权限说明all , all privileges所有权限select查询数据insert插入数据update修改数据delete删除数据alert修改表drop删除数据库/表/视图create创建数据库/表
1.查询权限 show grants for 用户名 主机名 例
show grants for itcastlocal host;
2.授予权限 grant 权限列表 on 数据库名.表名 to 用户名主机名 ; 例
grant all on itcast.* to itcastlocal host; 3.撤销权限 revoke 权限列表 on 数据库名.表名 from 用户名主机名 ; 例
revoke all on itcast.* from itcastlocal host;
本期分享就到此结束啦谢谢大家观看我们下期再见