概述
菜鸟一枚,欢迎大家指点哦
create database that;
use that;
create create table student(sno numeric(6) primary key, sname char(10) );
insert into student values (100001,'chen');
insert into student values(100002,'wang');
delimiter //;
create trigger update_student
before update on student for each row
begin
update student set sname=null ;
end //;
update student set sname=''ton' where sno=100001;
select * from student;
grant select ,update on that.student to nuser@localhost identified by 'good';
///nuser is a new user's name,the user will visite mysql. good is the password for
the new user//
在CMD命令行中进行如下操作
cmd
C:/Program Files/MySQL/MySQL Server 5.5/bin
(找到MYSQL的BIN 目录)显示为:
C:/Program Files/MySQL/MySQL Server 5.5/bin>
(put in )
mysql -h localhost -u nuser -p
(show)
Enter password:
(put in)
good
接下来就可以使用授予的权限了……
最后
以上就是背后小馒头为你收集整理的mysql 的触发器和授权的全部内容,希望文章能够帮你解决mysql 的触发器和授权所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复