1drop database if exists events_test; 2drop database if exists mysqltest_db2; 3create database events_test; 4use events_test; 5grant create, insert, select, delete on mysqltest_db2.* 6to mysqltest_user1@localhost; 7create database mysqltest_db2; 8set autocommit=off; 9select @@autocommit; 10@@autocommit 110 12create table t1 (a varchar(255)) engine=innodb; 13begin work; 14insert into t1 (a) values ("OK: create event: insufficient privileges"); 15create event e1 on schedule every 1 day do select 1; 16ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' 17rollback work; 18select * from t1; 19a 20OK: create event: insufficient privileges 21delete from t1; 22commit work; 23begin work; 24insert into t1 (a) values ("OK: alter event: insufficient privileges"); 25alter event e1 on schedule every 1 day do select 1; 26ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' 27rollback work; 28select * from t1; 29a 30OK: alter event: insufficient privileges 31delete from t1; 32commit work; 33begin work; 34insert into t1 (a) values ("OK: drop event: insufficient privileges"); 35drop event e1; 36ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' 37rollback work; 38select * from t1; 39a 40OK: drop event: insufficient privileges 41delete from t1; 42commit work; 43drop user mysqltest_user1@localhost; 44drop database mysqltest_db2; 45drop database events_test; 46