海珠做网站要多少钱,重庆市网络营销推广,网站前置审批项 教育,网络推广的重要性与好处USAGE --无权限,只有登录数据库,只可以使用test或test_*数据库 ALL --所有权限
select/update/delete/super/slave/reload --指定的权限 with grant option --允许把自己的权限授予其它用户(此用户拥有建立账号的权限)
权限级别#xff1a; 1、. #xff0d;#xff0d;全…USAGE --无权限,只有登录数据库,只可以使用test或test_*数据库 ALL --所有权限
select/update/delete/super/slave/reload --指定的权限 with grant option --允许把自己的权限授予其它用户(此用户拥有建立账号的权限)
权限级别 1、. 全库、全表mysql.user 2、mysql.* mysql库下所有表某库中的所有表(mysql.db) 3、mysql.user mysql库中user表单表(mysql.table_priv) 4、mysql.user.host mysql库中user表的host列(mysql.columns_priv)
用户权限
userlocalhost 本地 user192.168.0.1 某一台主机 user192.168.0.0/255.555.255.0 内网网段可以登录 user% 任何机器上都可以登录
登录方式本地|网络 with grant option ALLselect|insert|update|delete .
1.新建一个本地帐号u01 可以创建用户可以执行所有的动作对所有库的所有表执行
create user u01localhost identified by 123;
grant all on *.* to u01localhost with grant option ; 2.使用u01来 新建u02使用tcp方式登录 对db01库可以执行任何操作
create user u02192.168.0.1 identified by 456;
grant all on db01.* to u02192.168.0.1;mysql -u u02 -p456 -h192.168.0.1 -P33063.新建u03 在客服端192.168.0.254 对db01库中t1表可以执行任何操作
grant all on db01.t1 to u03192.168.0.254 identified by 789;4.新建u04 在内网网段192.168.0.0/24 对db01.t1.id 可以执行任何操作
grant select,update(id,name) on db01.t1 to u04192.168.0.0/24(掩码必须写完整的) identified by 123456;
update mysql.user set host192.168.0.0/255.255.255.0 where useru04;
flush privileges;
grant select,update(id,name) on db01.t1 to u04192.168.0.0/255.255.255.05.新建u05 在任何机器上可以登录 对db02全库操作
grant all on db02.* to u05% identified by redhat;取消权限revoke
revoke all on *.* from u01localhost;
delete from mysql.user where user regexp ^u.*;
flush privileges;不进数据库在外面查看表信息
mysql -uroot -p123 -e select user,host,password from mysql.user