2 grant all on d1.* to 'sample'@'localhost' identified by 'password';
8 ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2'
10 ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1'
11 drop user 'sample'@'localhost';
12 drop database if exists d1;
15 CREATE TABLE T1(f1 INT);
16 CREATE TABLE t1(f1 INT);
17 GRANT SELECT ON T1 to user_1@localhost;
19 ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1'
22 GRANT SELECT ON t1 to user_1@localhost;
23 select * from information_schema.table_privileges;
24 GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
25 'user_1'@'localhost' NULL d1 T1 SELECT NO
26 'user_1'@'localhost' NULL d1 t1 SELECT NO
27 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
28 DROP USER user_1@localhost;
33 CREATE PROCEDURE p1() BEGIN END;
34 CREATE FUNCTION f1(i INT) RETURNS INT RETURN i+1;
35 GRANT USAGE ON db1.* to user_1@localhost;
36 GRANT EXECUTE ON PROCEDURE db1.P1 to user_1@localhost;
37 GRANT EXECUTE ON FUNCTION db1.f1 to user_1@localhost;
38 GRANT UPDATE ON db1.* to USER_1@localhost;
45 ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.p1'
47 ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.p1'
49 ERROR 42000: execute command denied to user 'USER_1'@'localhost' for routine 'db1.f1'
50 REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
51 REVOKE ALL PRIVILEGES, GRANT OPTION FROM USER_1@localhost;
54 DROP USER user_1@localhost;
55 DROP USER USER_1@localhost;