connecting as root connected as root SETTING UP FOR PRIVILEGE TESTS DROP DATABASE IF EXISTS privdb; DROP DATABASE IF EXISTS upgradedb; DROP DATABASE IF EXISTS downgradedb; DROP DATABASE IF EXISTS no_privdb; CREATE DATABASE privdb; CREATE DATABASE no_privdb; SET SQL_WARNINGS=1; use privdb; DROP TABLE IF EXISTS t1, t2, already_there, drop_table, delete_table; DROP VIEW IF EXISTS v1, v2, v3, v4, v5, v6, v7, v8; CREATE TABLE already_there (c1 INT); CREATE TABLE drop_table (c1 INT); CREATE TABLE t1 (c1 INT, English CHAR(10), c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t2 (French CHAR(10), col2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY); INSERT INTO t1 (c1, English) VALUES (1, 'blue'), (2, 'green'), (3, 'red'), (4, 'black'); INSERT INTO t2 (French) VALUES ('bleu'), ('vert'), ('rouge'), ('noir'); CREATE TABLE delete_table AS SELECT * FROM privdb.t1; CREATE VIEW v1 AS SELECT * FROM privdb.t1; Create function hello() Returns varchar(20) BEGIN Return 'Hello'; END// CREATE PROCEDURE selAll() BEGIN SELECT * FROM privdb.t1; END// GRANT CREATE USER ON *.* TO 'create_user'@'localhost' IDENTIFIED BY 'create_user' WITH GRANT OPTION; GRANT CREATE ON privdb.new_table TO 'create_table'@'localhost' IDENTIFIED BY 'create_table' WITH GRANT OPTION; GRANT CREATE, INSERT ON privdb.* TO 'create_db'@'localhost' IDENTIFIED BY 'create_db' WITH GRANT OPTION; GRANT CREATE, INSERT ON *.* TO 'create_all'@'localhost' IDENTIFIED BY 'create_all' WITH GRANT OPTION; GRANT CREATE ROUTINE ON privdb.* TO 'create_rout_db'@'localhost' IDENTIFIED BY 'create_rout_db' WITH GRANT OPTION; GRANT CREATE ROUTINE ON *.* TO 'create_rout_all'@'localhost' IDENTIFIED BY 'create_rout_all' WITH GRANT OPTION; GRANT CREATE VIEW ON privdb.* TO 'create_view_db'@'localhost' IDENTIFIED BY 'create_view_db' WITH GRANT OPTION; GRANT CREATE VIEW ON *.* TO 'create_view_all'@'localhost' IDENTIFIED BY 'create_view_all' WITH GRANT OPTION; GRANT CREATE TEMPORARY TABLES ON privdb.* TO 'cre_temptbl_db'@'localhost' IDENTIFIED BY 'cre_temptbl_db' WITH GRANT OPTION; GRANT CREATE TEMPORARY TABLES ON *.* TO 'cre_temptbl_all'@'localhost' IDENTIFIED BY 'cre_temptbl_all' WITH GRANT OPTION; GRANT SELECT (English) ON privdb.t1 TO 'select_column'@'localhost' IDENTIFIED BY 'select_column' WITH GRANT OPTION; GRANT SELECT ON privdb.t1 TO 'select_table'@'localhost' IDENTIFIED BY 'select_table' WITH GRANT OPTION; GRANT SELECT ON privdb.* TO 'select_db'@'localhost' IDENTIFIED BY 'select_db' WITH GRANT OPTION; GRANT SELECT ON *.* TO 'select_all'@'localhost' IDENTIFIED BY 'select_all' WITH GRANT OPTION; GRANT ALTER ON privdb.t1 TO 'alter_table'@'localhost' IDENTIFIED BY 'alter_table' WITH GRANT OPTION; GRANT ALTER ON privdb.* TO 'alter_db'@'localhost' IDENTIFIED BY 'alter_db' WITH GRANT OPTION; GRANT ALTER ON *.* TO 'alter_all'@'localhost' IDENTIFIED BY 'alter_all' WITH GRANT OPTION; GRANT ALTER ROUTINE ON privdb.* TO 'alter_rout_db'@'localhost' IDENTIFIED BY 'alter_rout_db' WITH GRANT OPTION; GRANT ALTER ROUTINE ON *.* TO 'alter_rout_all'@'localhost' IDENTIFIED BY 'alter_rout_all' WITH GRANT OPTION; GRANT EXECUTE ON privdb.* TO 'execute_db'@'localhost' IDENTIFIED BY 'execute_db' WITH GRANT OPTION; GRANT EXECUTE ON *.* TO 'execute_all'@'localhost' IDENTIFIED BY 'execute_all' WITH GRANT OPTION; GRANT INSERT (English) ON privdb.t1 TO 'insert_column'@'localhost' IDENTIFIED BY 'insert_column' WITH GRANT OPTION; GRANT INSERT ON privdb.t1 TO 'insert_table'@'localhost' IDENTIFIED BY 'insert_table' WITH GRANT OPTION; GRANT INSERT ON privdb.* TO 'insert_db'@'localhost' IDENTIFIED BY 'insert_db' WITH GRANT OPTION; GRANT INSERT ON *.* TO 'insert_all'@'localhost' IDENTIFIED BY 'insert_all' WITH GRANT OPTION; GRANT REFERENCES (English) ON privdb.t1 TO 'references_col'@'localhost' IDENTIFIED BY 'references_col' WITH GRANT OPTION; GRANT REFERENCES ON privdb.t1 TO 'references_tbl'@'localhost' IDENTIFIED BY 'references_tbl' WITH GRANT OPTION; GRANT REFERENCES ON privdb.* TO 'references_db'@'localhost' IDENTIFIED BY 'references_db' WITH GRANT OPTION; GRANT REFERENCES ON *.* TO 'references_all'@'localhost' IDENTIFIED BY 'references_all' WITH GRANT OPTION; GRANT UPDATE (English) ON privdb.t1 TO 'update_column'@'localhost' IDENTIFIED BY 'update_column' WITH GRANT OPTION; GRANT UPDATE ON privdb.t1 TO 'update_table'@'localhost' IDENTIFIED BY 'update_table' WITH GRANT OPTION; GRANT UPDATE ON privdb.* TO 'update_db'@'localhost' IDENTIFIED BY 'update_db' WITH GRANT OPTION; GRANT UPDATE ON *.* TO 'update_all'@'localhost' IDENTIFIED BY 'update_all' WITH GRANT OPTION; GRANT INDEX ON privdb.t1 TO 'index_table'@'localhost' IDENTIFIED BY 'index_table' WITH GRANT OPTION; GRANT INDEX ON privdb.* TO 'index_db'@'localhost' IDENTIFIED BY 'index_db' WITH GRANT OPTION; GRANT INDEX ON *.* TO 'index_all'@'localhost' IDENTIFIED BY 'index_all' WITH GRANT OPTION; GRANT SHOW VIEW ON privdb.v1 TO 'show_view_tbl'@'localhost' IDENTIFIED BY 'show_view_tbl' WITH GRANT OPTION; GRANT SHOW VIEW ON privdb.* TO 'show_view_db'@'localhost' IDENTIFIED BY 'show_view_db' WITH GRANT OPTION; GRANT SHOW VIEW ON *.* TO 'show_view_all'@'localhost' IDENTIFIED BY 'show_view_all' WITH GRANT OPTION; GRANT DROP ON privdb.drop_table TO 'drop_table'@'localhost' IDENTIFIED BY 'drop_table' WITH GRANT OPTION; GRANT DROP ON privdb.* TO 'drop_db'@'localhost' IDENTIFIED BY 'drop_db' WITH GRANT OPTION; GRANT DROP ON *.* TO 'drop_all'@'localhost' IDENTIFIED BY 'drop_all' WITH GRANT OPTION; GRANT DELETE ON privdb.delete_table TO 'delete_table'@'localhost' IDENTIFIED BY 'delete_table' WITH GRANT OPTION; GRANT DELETE ON privdb.* TO 'delete_db'@'localhost' IDENTIFIED BY 'delete_db' WITH GRANT OPTION; GRANT DELETE ON *.* TO 'delete_all'@'localhost' IDENTIFIED BY 'delete_all' WITH GRANT OPTION; GRANT LOCK TABLES ON privdb.* TO 'lock_db'@'localhost' IDENTIFIED BY 'lock_db' WITH GRANT OPTION; GRANT LOCK TABLES ON *.* TO 'lock_all'@'localhost' IDENTIFIED BY 'lock_all' WITH GRANT OPTION; GRANT RELOAD ON *.* TO 'reload'@'localhost' IDENTIFIED BY 'reload' WITH GRANT OPTION; GRANT SHUTDOWN ON *.* TO 'shutdown'@'localhost' IDENTIFIED BY 'shutdown' WITH GRANT OPTION; GRANT PROCESS ON *.* TO 'process'@'localhost' IDENTIFIED BY 'process' WITH GRANT OPTION; GRANT FILE ON *.* TO 'file'@'localhost' IDENTIFIED BY 'file' WITH GRANT OPTION; GRANT SHOW DATABASES ON *.* TO 'show_db'@'localhost' IDENTIFIED BY 'show_db' WITH GRANT OPTION; GRANT SUPER ON *.* TO 'super'@'localhost' IDENTIFIED BY 'super' WITH GRANT OPTION; GRANT REPLICATION SLAVE ON *.* TO 'repl_slave'@'localhost' IDENTIFIED BY 'repl_slave' WITH GRANT OPTION; GRANT REPLICATION CLIENT ON *.* TO 'repl_client'@'localhost' IDENTIFIED BY 'repl_client' WITH GRANT OPTION; GRANT SELECT ON *.* TO 'killme'@'localhost' IDENTIFIED BY 'killme'; GRANT SELECT ON *.* TO 'killme2'@'localhost'IDENTIFIED BY 'killme2'; connecting as user 'create_user'; connected; GRANT USAGE ON *.* TO 'none'@'localhost' IDENTIFIED BY 'none'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT USAGE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' connecting as user 'create_user'; connected; GRANT CREATE USER ON *.* TO 'none'@'localhost' WITH GRANT OPTION; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT CREATE USER ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT USAGE ON *.* TO 'temp_user'@'localhost' IDENTIFIED BY 'temp_user'; 'connecting as user \'temp_user\''; 'connected'; SHOW GRANTS; Grants for temp_user@localhost GRANT USAGE ON *.* TO 'temp_user'@'localhost' IDENTIFIED BY PASSWORD '*4A046B7BE393E5B2729300DA31FC78E1D391E735' connecting as user 'none'; connected; DROP USER 'temp_user'@'localhost'; connecting as root; connected; SELECT user, host FROM mysql.user WHERE user='temp_user'; user host connecting as user 'select_column'; connected; GRANT SELECT (English) ON privdb.t1 TO 'none'@'localhost'; SELECT c5 FROM privdb.t1; ERROR 42S22: Unknown column 'c5' in 'field list' SELECT * FROM privdb.t1; ERROR 42000: SELECT command denied to user 'select_column'@'localhost' for column 'c1' in table 't1' SELECT * FROM mysql.user; ERROR 42000: SELECT command denied to user 'select_column'@'localhost' for table 'user' SELECT English FROM privdb.t1 WHERE c1<=3; ERROR 42000: SELECT command denied to user 'select_column'@'localhost' for column 'c1' in table 't1' SELECT English FROM privdb.t1 ORDER BY c1 DESC; ERROR 42000: SELECT command denied to user 'select_column'@'localhost' for column 'c1' in table 't1' SELECT English FROM privdb.t1; English blue green red black SELECT English FROM privdb.t1 ORDER BY English DESC; English red green blue black connecting as user 'none'; connected; SELECT English FROM privdb.t1; English blue green red black connecting as user 'select_table'; connected; GRANT SELECT ON privdb.t1 TO 'none'@'localhost'; use privdb; SELECT * FROM privdb.t2; ERROR 42000: SELECT command denied to user 'select_table'@'localhost' for table 't2' SELECT * FROM mysql.user; ERROR 42000: SELECT command denied to user 'select_table'@'localhost' for table 'user' SELECT * FROM privdb.t7; ERROR 42000: SELECT command denied to user 'select_table'@'localhost' for table 't7' SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 SELECT * FROM privdb.t1 LIMIT 2; c1 English c3 1 blue 1 2 green 2 SELECT * FROM privdb.t1 WHERE c3<=3 ORDER BY ENGLISH DESC; c1 English c3 3 red 3 2 green 2 1 blue 1 connecting as user 'none'; connected; SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 connecting as user 'select_db'; connected; GRANT SELECT ON privdb.* TO 'none'@'localhost'; SELECT * FROM mysql.user; ERROR 42000: SELECT command denied to user 'select_db'@'localhost' for table 'user' SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 SELECT * FROM privdb.t2; French col2 bleu 1 vert 2 rouge 3 noir 4 connecting as user 'none'; connected; use privdb; SELECT * from v1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 SELECT English, French FROM t1 INNER JOIN t2 ON t1.c3=t2.col2; English French blue bleu green vert red rouge black noir connecting as user 'select_all'; connected; GRANT SELECT ON *.* TO 'none'@'localhost'; SELECT user FROM mysql.user WHERE user='select_all'; user select_all connecting as user 'none'; connected; SELECT user FROM mysql.user WHERE user='select_all'; user select_all connecting as user 'create_table'; connected; GRANT CREATE ON privdb.new_table TO 'none'@'localhost'; CREATE TABLE upgradedb.no_way (c1 INT); ERROR 42000: CREATE command denied to user 'create_table'@'localhost' for table 'no_way' CREATE TABLE privdb.new_table (c1 INT); connecting to user 'root'; connected; SHOW TABLES LIKE 'new_table'; Tables_in_privdb (new_table) new_table DROP TABLE privdb.new_table; connecting to user 'none'; connected; CREATE TABLE privdb.new_table (c1 INT); DESCRIBE privdb.new_table; Field Type Null Key Default Extra c1 int(11) YES NULL SHOW CREATE TABLE privdb.new_table; Table Create Table new_table CREATE TABLE `new_table` ( `c1` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 connecting to user 'root'; connected; DROP TABLE privdb.new_table; connecting as user 'create_db'; connected; GRANT CREATE ON *.* TO 'none'@'localhost'; ERROR 28000: Access denied for user 'create_db'@'localhost' (using password: YES) GRANT CREATE ON privdb.* TO 'nonone'@'localhost'; Got one of the listed errors GRANT CREATE, INSERT ON privdb.* TO 'none'@'localhost'; use privdb; CREATE DATABASE foo; ERROR 42000: Access denied for user 'create_db'@'localhost' to database 'foo' CREATE USER 'foo_user'@'localhost' IDENTIFIED BY 'foo_user'; ERROR 42000: Access denied; you need the CREATE USER privilege for this operation CREATE VIEW foo_view AS SELECT CURRENT_USER(); ERROR 42000: CREATE VIEW command denied to user 'create_db'@'localhost' for table 'foo_view' CREATE TABLE already_there (c1 INT, c2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY); ERROR 42S01: Table 'already_there' already exists CREATE TABLE IF NOT EXISTS already_there (c1 INT, c2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY); Warnings: Note 1050 Table 'already_there' already exists CREATE TEMPORARY TABLE foo55 (c1 INT); ERROR 42000: Access denied for user 'create_db'@'localhost' to database 'privdb' CREATE TABLE no_privdb.magoo (c1 INT); ERROR 42000: CREATE command denied to user 'create_db'@'localhost' for table 'magoo' CREATE TABLE foo LIKE t1; ERROR 42000: SELECT command denied to user 'create_db'@'localhost' for table 't1' GRANT SELECT ON privdb.t1 TO 'create_db'@'localhost'; CREATE TABLE foo LIKE t1; CREATE TABLE foo2 (c1 INT, c2 CHAR(25) DEFAULT 'default value', c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE foo3 (c1 INT, c2 CHAR(25) DEFAULT 'default value', c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY) engine=memory; CREATE TABLE foo4 (c1 INT, c2 CHAR(25) DEFAULT 'default value', c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY) engine=myISAM; DESCRIBE foo; ERROR 42000: SELECT command denied to user 'create_db'@'localhost' for table 'foo' DROP TABLE foo; ERROR 42000: DROP command denied to user 'create_db'@'localhost' for table 'foo' RENAME TABLE foo TO foot; ERROR 42000: DROP,ALTER command denied to user 'create_db'@'localhost' for table 'foo' CREATE INDEX French_index ON foo2(French); ERROR 42000: INDEX command denied to user 'create_db'@'localhost' for table 'foo2' connecting as user 'none'; connected; use privdb; CREATE TABLE time (c2 INT NOT NULL UNIQUE, c1 timestamp DEFAULT CURRENT_TIMESTAMP); connecting as user 'root'; connected; use privdb; SHOW CREATE TABLE foo; Table Create Table foo CREATE TABLE `foo` ( `c1` int(11) DEFAULT NULL, `English` char(10) DEFAULT NULL, `c3` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c3`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE foo2; Table Create Table foo2 CREATE TABLE `foo2` ( `c1` int(11) DEFAULT NULL, `c2` char(25) DEFAULT 'default value', `c3` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c3`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE foo3; Table Create Table foo3 CREATE TABLE `foo3` ( `c1` int(11) DEFAULT NULL, `c2` char(25) DEFAULT 'default value', `c3` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c3`) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE foo4; Table Create Table foo4 CREATE TABLE `foo4` ( `c1` int(11) DEFAULT NULL, `c2` char(25) DEFAULT 'default value', `c3` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`c3`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 DROP TABLE foo, foo2, foo3, foo4, time; connecting as user 'create_all'; connected; GRANT CREATE, INSERT ON *.* TO 'none'@'localhost'; CREATE DATABASE privdb; ERROR HY000: Can't create database 'privdb'; database exists CREATE DATABASE IF NOT EXISTS privdb; Warnings: Note 1007 Can't create database 'privdb'; database exists CREATE DATABASE upgrade_drop_me_db; use upgrade_drop_me_db; CREATE SCHEMA downgrade_drop_me_db; use downgrade_drop_me_db; CREATE TABLE upgrade_drop_me_db.upgrade_drop_me_tbl (c1 INT); use upgrade_drop_me_db; SHOW TABLES; Tables_in_upgrade_drop_me_db upgrade_drop_me_tbl connecting as user 'none'; connected; CREATE DATABASE foo_temp; ERROR 42000: Access denied for user 'none'@'localhost' to database 'foo_temp' connecting to user 'none'; connected; CREATE DATABASE foo_temp; USE foo_temp; CREATE TABLE temp_table SELECT * from privdb.t1; SHOW TABLES LIKE 'temp%'; Tables_in_foo_temp (temp%) temp_table connecting as user 'root'; connected; DROP TABLE foo_temp.temp_table; DROP DATABASE foo_temp; connecting as user 'create_rout_db'; connected; GRANT CREATE ROUTINE ON privdb.* TO 'none'@'localhost'; use privdb; CREATE FUNCTION upgrade_del_func() RETURNS CHAR(20) BEGIN RETURN "INSIDE upgrade_del_func()"; END// CREATE FUNCTION upgrade_alter_func() RETURNS CHAR(20) BEGIN RETURN "INSIDE upgrade_alter_func()"; END// CREATE PROCEDURE downgrade_del_proc() SQL SECURITY INVOKER BEGIN SELECT c1, English, French FROM t1 JOIN t2 ON t1.c3 = t2.col2; END// CREATE PROCEDURE downgrade_alter_proc() SQL SECURITY DEFINER BEGIN SELECT c1, English, French FROM t1 JOIN t2 ON t1.c3 = t2.col2; END// CREATE PROCEDURE alter_proc() SQL SECURITY DEFINER BEGIN SELECT "Inside alter_proc()"; END// CALL downgrade_del_proc(); ERROR 42000: SELECT command denied to user 'create_rout_db'@'localhost' for table 't1' CALL downgrade_alter_proc(); ERROR 42000: SELECT command denied to user 'create_rout_db'@'localhost' for table 't1' SELECT hello(); Got one of the listed errors CALL selAll(); ERROR 42000: execute command denied to user 'create_rout_db'@'localhost' for routine 'privdb.selAll' DROP FUNCTION privdb.hello; ERROR 42000: alter routine command denied to user 'create_rout_db'@'localhost' for routine 'privdb.hello' DROP PROCEDURE privdb.selAll; ERROR 42000: alter routine command denied to user 'create_rout_db'@'localhost' for routine 'privdb.selAll' CREATE PROCEDURE downgradedb.bad_proc() sql security definer BEGIN SELECT CURRENT_USER(); END// ERROR 42000: Unknown database 'downgradedb' ALTER PROCEDURE privdb.selAll SQL SECURITY INVOKER; ERROR 42000: alter routine command denied to user 'create_rout_db'@'localhost' for routine 'privdb.selAll' CALL alter_proc(); Inside alter_proc() Inside alter_proc() SELECT upgrade_del_func(); upgrade_del_func() INSIDE upgrade_del_f Warnings: Warning 1265 Data truncated for column 'upgrade_del_func()' at row 1 ALTER PROCEDURE alter_proc SQL SECURITY INVOKER COMMENT "this is a test"; SHOW CREATE PROCEDURE alter_proc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation alter_proc CREATE DEFINER=`create_rout_db`@`localhost` PROCEDURE `alter_proc`() SQL SECURITY INVOKER COMMENT 'this is a test' BEGIN SELECT "Inside alter_proc()"; END latin1 latin1_swedish_ci utf8_general_ci ALTER PROCEDURE alter_proc SQL SECURITY DEFINER; connecting as user 'none'; connected use privdb; CREATE PROCEDURE none_proc() BEGIN SELECT CURRENT_USER(); END// CALL none_proc(); CURRENT_USER() none@localhost DROP PROCEDURE none_proc; CALL selAll(); ERROR 42000: execute command denied to user 'none'@'localhost' for routine 'privdb.selAll' SET PASSWORD FOR 'create_rout_db'@'localhost' = PASSWORD('create_rout_db'); SET PASSWORD FOR 'none'@'localhost' = PASSWORD('none'); connecting as user 'create_rout_all'; connected; GRANT CREATE ROUTINE ON *.* TO 'none'@'localhost'; CREATE PROCEDURE upgrade_drop_me_db.global_proc() BEGIN SELECT "inside global_proc()"; END// CREATE FUNCTION upgrade_drop_me_db.global_func() RETURNS INT BEGIN RETURN 555; END// CREATE FUNCTION upgrade_drop_me_db.drop_now() RETURNS INT BEGIN RETURN 555; END// CALL upgrade_drop_me_db.global_proc(); inside global_proc() inside global_proc() SELECT upgrade_drop_me_db.global_func(); upgrade_drop_me_db.global_func() 555 ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY INVOKER; SHOW CREATE PROCEDURE upgrade_drop_me_db.global_proc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation global_proc CREATE DEFINER=`create_rout_all`@`localhost` PROCEDURE `global_proc`() SQL SECURITY INVOKER BEGIN SELECT "inside global_proc()"; END latin1 latin1_swedish_ci utf8_general_ci ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY DEFINER; DROP FUNCTION upgrade_drop_me_db.drop_now; SHOW CREATE PROCEDURE upgrade_drop_me_db.global_proc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation global_proc CREATE DEFINER=`create_rout_all`@`localhost` PROCEDURE `global_proc`() BEGIN SELECT "inside global_proc()"; END latin1 latin1_swedish_ci utf8_general_ci CALL privdb.selAll(); ERROR 42000: execute command denied to user 'create_rout_all'@'localhost' for routine 'privdb.selAll' SELECT privdb.hello(); Got one of the listed errors DROP FUNCTION privdb.hello; ERROR 42000: alter routine command denied to user 'create_rout_all'@'localhost' for routine 'privdb.hello' connecting as user 'none'; connected CREATE PROCEDURE upgrade_drop_me_db.none_proc() SELECT CURRENT_USER(); CALL upgrade_drop_me_db.none_proc(); CURRENT_USER() none@localhost DROP PROCEDURE upgrade_drop_me_db.none_proc; CALL privdb.selAll(); ERROR 42000: execute command denied to user 'none'@'localhost' for routine 'privdb.selAll' connecting as 'root'; connected; SET PASSWORD FOR 'create_rout_all'@'localhost' = PASSWORD('create_rout_all'); SET PASSWORD FOR 'none'@'localhost' = PASSWORD('none'); connecting as user 'execute_db'; connected; GRANT EXECUTE ON privdb.* TO 'none'@'localhost'; use privdb; SELECT upgrade_del_func(); upgrade_del_func() INSIDE upgrade_del_f Warnings: Warning 1265 Data truncated for column 'upgrade_del_func()' at row 1 CALL alter_proc(); Inside alter_proc() Inside alter_proc() CALL selAll(); c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 SELECT hello(); hello() Hello CALL downgrade_del_proc(); ERROR 42000: SELECT command denied to user 'execute_db'@'localhost' for table 't1' connecting as 'root'; connected; GRANT SELECT ON privdb.* to 'execute_db'@'localhost'; connecting as 'execute_db'; connected; use privdb; CALL downgrade_del_proc(); c1 English French 1 blue bleu 2 green vert 3 red rouge 4 black noir CALL downgrade_alter_proc(); ERROR 42000: SELECT command denied to user 'create_rout_db'@'localhost' for table 't1' REVOKE SELECT ON privdb.* FROM 'execute_db'@'localhost'; connecting as user 'create_rout_db'; connected; DROP PROCEDURE privdb.alter_proc; connecting as user 'execute_all'; connected; GRANT EXECUTE ON *.* TO 'none'@'localhost'; CALL upgrade_drop_me_db.global_proc(); inside global_proc() inside global_proc() CALL privdb.selAll(); c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 connecting as user 'none'; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, CREATE, EXECUTE, CREATE ROUTINE, CREATE USER ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT SELECT, INSERT, CREATE, EXECUTE, CREATE ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' GRANT SELECT, SELECT (English) ON `privdb`.`t1` TO 'none'@'localhost' connected; CALL upgrade_drop_me_db.global_proc(); ERROR 42000: execute command denied to user 'none'@'localhost' for routine 'upgrade_drop_me_db.global_proc' connecting to user 'none'; connected; CALL upgrade_drop_me_db.global_proc(); inside global_proc() inside global_proc() connecting as user 'create_view_db'; connected; GRANT CREATE VIEW ON *.* TO 'none'@'localhost'; ERROR 28000: Access denied for user 'create_view_db'@'localhost' (using password: YES) GRANT CREATE VIEW ON privdb.* TO 'nonone'@'localhost'; Got one of the listed errors GRANT CREATE VIEW ON privdb.* TO 'none'@'localhost'; use privdb; CREATE VIEW bad AS SELECT CURRENT_USER() AS FOO, CURRENT_USER() AS FOO; ERROR 42S21: Duplicate column name 'FOO' CREATE VIEW bad (foo, foo) AS SELECT CURRENT_TIME(), CURRENT_DATE(); ERROR 42S21: Duplicate column name 'foo' CREATE VIEW bad (foo, bar, fum) AS SELECT CURRENT_TIME(), CURRENT_DATE(); ERROR HY000: View's SELECT and view's field list have different column counts CREATE VIEW t1 AS SELECT CURRENT_USER(); ERROR 42S01: Table 't1' already exists DROP VIEW v2; ERROR 42000: DROP command denied to user 'create_view_db'@'localhost' for table 'v2' CREATE OR REPLACE VIEW v2 AS SELECT * FROM t1; ERROR 42000: DROP command denied to user 'create_view_db'@'localhost' for table 'v2' CREATE VIEW bad AS SELECT * FROM privdb.t1; ERROR 42000: ANY command denied to user 'create_view_db'@'localhost' for table 't1' CREATE VIEW v2 AS SELECT CURRENT_USER(); CREATE VIEW v3 AS SELECT pi() AS pi, SIN(radians(90)); CREATE VIEW v4 (pi, SIN90) AS SELECT pi(), SIN(radians(90)); connecting as user 'none'; connected; use privdb; CREATE VIEW v5 AS SELECT CURRENT_USER(); connecting as user 'root'; connected; GRANT SELECT on privdb.* TO 'create_view_db'@'localhost'; use privdb; CREATE VIEW v6 AS SELECT * FROM t1; CREATE VIEW v7 (Eng, FR) AS SELECT english, french from t1 JOIN t2 ON t1.c3 = t2.col2; connecting as user 'none'; connected; use privdb; CREATE VIEW v8 AS SELECT english, french from t1 JOIN t2 ON t1.c3 = t2.col2 WHERE t1.c3 <=3; SELECT * FROM v1 WHERE c3 > 2 ORDER BY c1 DESC; c1 English c3 4 black 4 3 red 3 SELECT * FROM v3; pi SIN(radians(90)) 3.141593 1 SELECT * FROM v4; pi SIN90 3.141593 1 SELECT * FROM v6 ORDER BY English DESC LIMIT 2; c1 English c3 3 red 3 2 green 2 SELECT Eng from v7 ORDER BY Fr; Eng blue black red green SELECT * from v7; Eng FR blue bleu green vert red rouge black noir SELECT * FROM v8 LIMIT 1; english french blue bleu connecting as user 'create_view_all'; connected; GRANT CREATE VIEW ON *.* TO 'none'@'localhost'; use privdb; CREATE VIEW upgrade_drop_me_db.vTemp AS SELECT * FROM privdb.v8; ERROR 42000: ANY command denied to user 'create_view_all'@'localhost' for table 'v8' CREATE VIEW upgrade_drop_me_db.alter_view AS SELECT CURRENT_USER(); connecting as user 'none'; connected; CREATE VIEW upgrade_drop_me_db.vTemp AS SELECT * FROM privdb.v8; SELECT * FROM upgrade_drop_me_db.vTemp; english french blue bleu green vert red rouge connecting as user 'root'; connected; DROP VIEW upgrade_drop_me_db.vTemp; connecting as user 'root'; connected; GRANT SELECT ON *.* TO 'create_view_all'@'localhost'; CREATE VIEW downgrade_drop_me_db.global_view AS SELECT * FROM privdb.t1; connecting as user 'none'; connected; use privdb; CREATE VIEW upgrade_drop_me_db.vTemp AS SELECT user,host FROM mysql.user; connecting as user 'root'; connected; DROP VIEW upgrade_drop_me_db.vTemp; connecting as user 'cre_temptbl_db'; connected; GRANT CREATE TEMPORARY TABLES ON privdb.* TO 'none'@'localhost'; use privdb; CREATE TEMPORARY TABLE temp_table LIKE t1; ERROR 42000: SELECT command denied to user 'cre_temptbl_db'@'localhost' for table 't1' GRANT SELECT ON privdb.t1 TO 'cre_temptbl_db'@'localhost'; CREATE TEMPORARY TABLE temp_table LIKE t1; CREATE TEMPORARY TABLE temp_table LIKE t1; ERROR 42S01: Table 'temp_table' already exists disconnecting user 'cre_temptbl_db'; disconnected; connecting as user 'cre_temptbl_db'; connected; use privdb; CREATE TEMPORARY TABLE temp_table LIKE t1; connecting as user 'none'; connected; use privdb; CREATE TEMPORARY TABLE temp_table LIKE t1; CREATE TEMPORARY TABLE temp_table LIKE t1; ERROR 42S01: Table 'temp_table' already exists SELECT * FROM temp_table; c1 English c3 connected; GRANT INSERT (English) ON privdb.t1 TO 'none'@'localhost'; INSERT INTO privdb.t1 (c1, English) VALUES (3, 'violet'); ERROR 42000: INSERT command denied to user 'insert_column'@'localhost' for column 'c1' in table 't1' INSERT INTO privdb.t2 VALUES ('violet'); ERROR 42000: INSERT command denied to user 'insert_column'@'localhost' for table 't2' INSERT INTO upgradedb.t1 VALUES ('666'); ERROR 42000: INSERT command denied to user 'insert_column'@'localhost' for table 't1' INSERT INTO privdb.t1 (English) VALUES ('white'); connecting as user 'none'; connected; INSERT INTO privdb.t1 (English) VALUES ('yellow'); SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 NULL white 5 NULL yellow 6 connecting as user 'insert_table'; connected; GRANT INSERT ON privdb.t1 TO 'none'@'localhost'; INSERT INTO privdb.t2 VALUES ('violet'); ERROR 42000: INSERT command denied to user 'insert_table'@'localhost' for table 't2' INSERT INTO upgradedb.t1 VALUES ('666'); ERROR 42000: INSERT command denied to user 'insert_table'@'localhost' for table 't1' INSERT INTO privdb.t1 (c1,English) VALUES (7, 'brown'); connecting as user 'none'; connected; INSERT INTO privdb.t1 (c1, English) VALUES (8, 'orange'); SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 NULL white 5 NULL yellow 6 7 brown 7 8 orange 8 connecting as user 'insert_db'; connected; GRANT INSERT ON privdb.* TO 'none'@'localhost'; INSERT INTO upgradedb.t1 VALUES ('666'); ERROR 42000: INSERT command denied to user 'insert_db'@'localhost' for table 't1' INSERT INTO privdb.t2 (French) VALUES ('blanc'), ('jaune'); INSERT INTO privdb.drop_table VALUES (1),(2),(3); connecting as user 'none'; connected; use privdb; INSERT INTO privdb.t2 (French) VALUES ('brun'), ('orange'); SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 NULL white 5 NULL yellow 6 7 brown 7 8 orange 8 connecting as user 'insert_all'; connected; GRANT INSERT ON *.* TO 'none'@'localhost'; INSERT INTO upgrade_drop_me_db.upgrade_drop_me_tbl VALUES (66); connecting as use 'none'; connected; INSERT INTO upgrade_drop_me_db.upgrade_drop_me_tbl VALUES (67); SELECT * FROM upgrade_drop_me_db.upgrade_drop_me_tbl; c1 66 67 connecting as user 'references_col'; connected; GRANT REFERENCES (English) ON privdb.t1 TO 'none'@'localhost'; connecting as user 'references_tbl'; connected; GRANT REFERENCES ON privdb.t1 TO 'none'@'localhost'; connecting as user 'references_db'; connected; GRANT REFERENCES ON privdb.* TO 'none'@'localhost'; connecting as user 'references_all'; connected; GRANT REFERENCES ON *.* TO 'none'@'localhost'; connecting as user 'update_column'; connected; GRANT UPDATE (English) ON privdb.t1 TO 'none'@'localhost'; UPDATE privdb.t1 SET English = 'white' WHERE c1=1; ERROR 42000: SELECT command denied to user 'update_column'@'localhost' for column 'c1' in table 't1' UPDATE privdb.t1 SET English= 'white' WHERE c4=1; ERROR 42S22: Unknown column 'c4' in 'where clause' connecting as user 'root'; connected GRANT SELECT (c1) ON privdb.t1 TO 'update_column'@'localhost'; UPDATE privdb.t1 SET English='pink' WHERE c1=1; connecting to user 'none'; connected; SELECT * FROM privdb.t1 WHERE English='pink'; c1 English c3 1 pink 1 UPDATE privdb.t1 SET English='white' WHERE c1=1; SELECT * FROM privdb.t1; c1 English c3 1 white 1 2 green 2 3 red 3 4 black 4 NULL white 5 NULL yellow 6 7 brown 7 8 orange 8 connecting as user 'update_table'; connected; GRANT UPDATE ON privdb.t1 TO 'none'@'localhost'; GRANT SELECT ON privdb.t1 TO 'update_table'@'localhost'; connecting as user 'update_table'; connected; UPDATE privdb.t1 SET c1=5 WHERE c3=5; UPDATE privdb.t1 SET c1=6 WHERE English = 'yellow'; connecting as user 'update_db'; connected; GRANT UPDATE ON privdb.* TO 'none'@'localhost'; GRANT SELECT ON privdb.* TO 'update_db'@'localhost'; use privdb; connecting as user 'update_db'; connected UPDATE privdb.t2 SET French = 'croissant' WHERE French = 'noir'; connecting to user 'none'; connected; SELECT * FROM privdb.t2; French col2 bleu 1 vert 2 rouge 3 croissant 4 blanc 5 jaune 6 brun 7 orange 8 UPDATE privdb.t2 SET French = 'noir' WHERE French = 'croissant'; SELECT * FROM privdb.t2; French col2 bleu 1 vert 2 rouge 3 noir 4 blanc 5 jaune 6 brun 7 orange 8 connecting as user 'update_all'; connected; GRANT UPDATE ON *.* TO 'none'@'localhost'; connecting as user 'none'; connecting as user 'index_table'; connected; GRANT INDEX ON privdb.t1 TO 'none'@'localhost'; CREATE UNIQUE INDEX index1 ON privdb.t1 (English); ERROR 23000: Duplicate entry 'white' for key 'index1' connecting as user 'none'; connected; UPDATE privdb.t1 SET English='blue' WHERE c3=1; connecting as user 'index_table'; connected; CREATE UNIQUE INDEX index1 ON privdb.t1 (English); DROP INDEX index1 ON privdb.t1; connecting as user 'none'; connected; CREATE INDEX index1 ON privdb.t1 (English); DROP INDEX index1 ON privdb.t1; connecting as user 'index_db'; connected; GRANT INDEX ON privdb.* TO 'none'@'localhost'; use privdb; CREATE UNIQUE INDEX index1 ON privdb.t2 (c3); ERROR 42000: Key column 'c3' doesn't exist in table CREATE INDEX index1 ON privdb.t2 (French); DROP INDEX index1 ON privdb.t2; connecting as user 'none'; connected; CREATE INDEX index1 ON privdb.t2 (French); DROP INDEX index1 ON privdb.t2; connecting as user 'index_all'; connected; GRANT INDEX ON *.* TO 'none'@'localhost'; connecting as user 'none'; CREATE INDEX index1 ON mysql.user (select_priv); DROP INDEX index1 ON mysql.user; connecting as user 'none'; connected; CREATE INDEX index1 ON mysql.user (select_priv); DROP INDEX index1 ON mysql.user; connecting as user 'show_view_tbl'; connected; GRANT SHOW VIEW ON privdb.v1 TO 'none'@'localhost'; SHOW CREATE VIEW privdb.v5; ERROR 42000: SELECT command denied to user 'show_view_tbl'@'localhost' for table 'v5' SHOW CREATE VIEW privdb.v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `privdb`.`v1` AS select `privdb`.`t1`.`c1` AS `c1`,`privdb`.`t1`.`English` AS `English`,`privdb`.`t1`.`c3` AS `c3` from `privdb`.`t1` latin1 latin1_swedish_ci connecting to user 'none'; connected; SHOW CREATE VIEW privdb.v5; ERROR 42000: SHOW VIEW command denied to user 'none'@'localhost' for table 'v5' SHOW CREATE VIEW privdb.v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `privdb`.`v1` AS select `privdb`.`t1`.`c1` AS `c1`,`privdb`.`t1`.`English` AS `English`,`privdb`.`t1`.`c3` AS `c3` from `privdb`.`t1` latin1 latin1_swedish_ci connecting as user 'show_view_db'; connected; GRANT SHOW VIEW ON privdb.* TO 'none'@'localhost'; SHOW CREATE VIEW upgradedb.upgrade_view; ERROR 42000: SELECT command denied to user 'show_view_db'@'localhost' for table 'upgrade_view' connecting as 'none' connected CREATE USER 'temp_user2'@'localhost' IDENTIFIED BY 'temp_user2'; GRANT SHOW VIEW, SELECT ON privdb.* TO 'temp_user2'@'localhost'; show grants; Grants for temp_user2@localhost GRANT USAGE ON *.* TO 'temp_user2'@'localhost' IDENTIFIED BY PASSWORD '*D0AF3D2A90AB08E17CE8442DC6741FFBF023A80D' GRANT SELECT, SHOW VIEW ON `privdb`.* TO 'temp_user2'@'localhost' connecting as 'root' connected REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'temp_user2'@'localhost'; DROP USER 'temp_user2'@'localhost'; connecting as user 'show_view_all'; connected; GRANT SHOW VIEW ON *.* TO 'none'@'localhost'; connecting as user 'alter_table'; connected; GRANT ALTER ON privdb.t1 TO 'none'@'localhost'; ALTER TABLE t2 ADD UNIQUE INDEX index1 (French); ERROR 42000: ALTER command denied to user 'alter_table'@'localhost' for table 't2' ALTER TABLE t1 ADD UNIQUE INDEX index1 (c1); connecting as user 'none'; connected ALTER TABLE privdb.t1 DROP INDEX index1; connecting as user 'alter_db'; connected; GRANT ALTER ON privdb.* TO 'none'@'localhost'; ALTER DATABASE upgradedb COLLATE latin1_spanish_ci; ERROR 42000: Access denied for user 'alter_db'@'localhost' to database 'upgradedb' ALTER DATABASE privdb COLLATE latin1_spanish_ci; ALTER TABLE privdb.t2 ADD UNIQUE INDEX index1 (French); connecting to user 'none'; connected; ALTER DATABASE privdb COLLATE latin1_swedish_ci; ALTER TABLE privdb.t2 DROP INDEX index1; connecting as user 'alter_all'; connected; GRANT ALTER ON *.* TO 'none'@'localhost'; ALTER DATABASE upgrade_drop_me_db COLLATE latin1_spanish_ci; connecting to user 'none'; connected; ALTER DATABASE upgrade_drop_me_db COLLATE latin1_swedish_ci; ERROR 42000: Access denied for user 'none'@'localhost' to database 'upgrade_drop_me_db' ALTER DATABASE upgrade_drop_me_db COLLATE latin1_swedish_ci; connecting as user 'alter_rout_db'; connected; GRANT ALTER ROUTINE ON privdb.* TO 'none'@'localhost'; ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY DEFINER; ERROR 42000: alter routine command denied to user 'alter_rout_db'@'localhost' for routine 'upgrade_drop_me_db.global_proc' ALTER FUNCTION privdb.hello SQL SECURITY INVOKER; connecting as user 'none'; connected;: ALTER FUNCTION privdb.hello SQL SECURITY DEFINER; connecting as user 'alter_rout_all'; connected; GRANT ALTER ROUTINE ON *.* TO 'none'@'localhost'; SHOW CREATE TABLE upgrade_drop_me_db.global_proc; ERROR 42000: SELECT command denied to user 'alter_rout_all'@'localhost' for table 'global_proc' ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY INVOKER; SHOW CREATE PROCEDURE upgrade_drop_me_db.global_proc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation global_proc * latin1 latin1_swedish_ci utf8_general_ci connecting to use 'none'; connected; ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY DEFINER; ERROR 42000: alter routine command denied to user 'none'@'localhost' for routine 'upgrade_drop_me_db.global_proc' connecting to use 'none'; connected; ALTER PROCEDURE upgrade_drop_me_db.global_proc SQL SECURITY DEFINER; SHOW CREATE PROCEDURE upgrade_drop_me_db.global_proc; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation global_proc CREATE DEFINER=`create_rout_all`@`localhost` PROCEDURE `global_proc`() BEGIN SELECT "inside global_proc()"; END latin1 latin1_swedish_ci utf8_general_ci connecting as user 'drop_table'; connected; GRANT DROP ON privdb.drop_table TO 'none'@'localhost'; DROP TABLE privdb.t1; ERROR 42000: DROP command denied to user 'drop_table'@'localhost' for table 't1' DROP VIEW privdb.v1; ERROR 42000: DROP command denied to user 'drop_table'@'localhost' for table 'v1' DROP TABLE privdb.drop_table; connecting as user 'root'; connected; CREATE TABLE privdb.drop_table SELECT * FROM privdb.t1; CREATE TABLE upgrade_drop_me_db.drop_table SELECT * FROM privdb.t1; CREATE TABLE upgrade_drop_me_db.another_drop_table SELECT * FROM privdb.t2; CREATE TABLE privdb.another_drop_table SELECT * FROM privdb.t2; CREATE VIEW upgrade_drop_me_db.drop_view AS SELECT * FROM privdb.t1; connecting to user 'none'; connected; DROP TABLE privdb.another_drop_table; ERROR 42000: DROP command denied to user 'none'@'localhost' for table 'another_drop_table' DROP TABLE privdb.drop_table; connecting as user 'drop_db'; connected; GRANT DROP ON privdb.* TO 'none'@'localhost'; DROP TABLE upgrade_drop_me_db.drop_table; ERROR 42000: DROP command denied to user 'drop_db'@'localhost' for table 'drop_table' DROP DATABASE no_privdb; ERROR 42000: Access denied for user 'drop_db'@'localhost' to database 'no_privdb' DROP TABLE privdb.another_drop_table; DROP VIEW privdb.v8; connecting to user 'none'; connecting; DROP TABLE upgrade_drop_me_db.drop_table; ERROR 42000: DROP command denied to user 'none'@'localhost' for table 'drop_table' DROP TABLE privdb.drop_table; ERROR 42S02: Unknown table 'drop_table' DROP VIEW privdb.v7; connecting as user 'drop_all'; connected; GRANT DROP ON *.* TO 'none'@'localhost'; DROP TABLE upgrade_drop_me_db.drop_table; DROP VIEW privdb.v6; DROP DATABASE no_privdb; connecting to user 'none'; connecting; DROP TABLE upgrade_drop_me_db.another_drop_table; ERROR 42000: DROP command denied to user 'none'@'localhost' for table 'another_drop_table' DROP TABLE upgrade_drop_me_db.another_drop_table; DROP VIEW upgrade_drop_me_db.drop_view; connecting as user 'delete_table'; connected; GRANT DELETE ON privdb.delete_table TO 'none'@'localhost'; DELETE FROM privdb.t1; ERROR 42000: DELETE command denied to user 'delete_table'@'localhost' for table 't1' DELETE FROM privdb.delete_table WHERE English='white'; ERROR 42000: SELECT command denied to user 'delete_table'@'localhost' for column 'English' in table 'delete_table' DELETE FROM privdb.delete_table; connecting to user 'none'; connected; SELECT * FROM privdb.delete_table; c1 English c3 DROP TABLE privdb.delete_table; CREATE TABLE privdb.delete_table AS SELECT * FROM privdb.t1; CREATE TABLE privdb.another_delete_table AS SELECT * FROM privdb.t2; CREATE TABLE upgrade_drop_me_db.delete_table AS SELECT * FROM privdb.t1; CREATE TABLE upgrade_drop_me_db.another_delete_table AS SELECT * FROM privdb.t2; DELETE FROM privdb.delete_table WHERE English='Red'; SELECT * FROM privdb.delete_table; c1 English c3 1 blue 1 2 green 2 4 black 4 5 white 5 6 yellow 6 7 brown 7 8 orange 8 DELETE FROM privdb.delete_table; DROP TABLE privdb.delete_table; connecting as user 'delete_db'; connected; GRANT DELETE ON privdb.* TO 'none'@'localhost'; DELETE FROM upgrade_drop_me_db.delete_table; ERROR 42000: DELETE command denied to user 'delete_db'@'localhost' for table 'delete_table' DELETE FROM privdb.another_delete_table WHERE French='noir'; ERROR 42000: SELECT command denied to user 'delete_db'@'localhost' for column 'French' in table 'another_delete_table' DELETE FROM privdb.another_delete_table; connecting to user 'none'; connected; SELECT * FROM privdb.another_delete_table; French col2 DROP TABLE privdb.another_delete_table; CREATE TABLE privdb.another_delete_table AS SELECT * FROM privdb.t2; DELETE FROM privdb.another_delete_table WHERE French='noir'; SELECT * FROM privdb.another_delete_table; French col2 bleu 1 vert 2 rouge 3 blanc 5 jaune 6 brun 7 orange 8 DELETE FROM privdb.another_delete_table; DROP TABLE privdb.another_delete_table; connecting as user 'delete_all'; connected; GRANT DELETE ON *.* TO 'none'@'localhost'; DELETE FROM upgrade_drop_me_db.delete_table WHERE English='green'; ERROR 42000: SELECT command denied to user 'delete_all'@'localhost' for column 'English' in table 'delete_table' DELETE FROM upgrade_drop_me_db.delete_table; connecting to user 'none'; connected; SELECT * FROM upgrade_drop_me_db.delete_table; c1 English c3 DELETE FROM upgrade_drop_me_db.another_delete_table WHERE French='noir'; ERROR 42000: DELETE command denied to user 'none'@'localhost' for table 'another_delete_table' connecting to user 'none'; connected; DELETE FROM upgrade_drop_me_db.another_delete_table WHERE French='noir'; DELETE FROM upgrade_drop_me_db.another_delete_table; SELECT * FROM upgrade_drop_me_db.another_delete_table; French col2 DROP TABLE upgrade_drop_me_db.delete_table, upgrade_drop_me_db.another_delete_table; connecting as user 'lock_db'; connected; GRANT LOCK TABLES ON privdb.* TO 'none'@'localhost'; LOCK TABLE privdb.t1 READ; ERROR 42000: SELECT command denied to user 'lock_db'@'localhost' for table 't1' UNLOCK TABLES; connecting as user 'root'; connected; GRANT SELECT ON privdb.t1 TO 'lock_db'@'localhost'; connnecting as use 'lock_db'; connected; LOCK TABLES privdb.t1 READ; UNLOCK TABLES; LOCK TABLES privdb.t1 WRITE; UNLOCK TABLES; REVOKE SELECT ON privdb.t1 FROM 'lock_db'@'localhost'; connecting to user 'none'; connected; LOCK TABLES privdb.t1 READ; UNLOCK TABLES; LOCK TABLES privdb.t1 WRITE; UNLOCK TABLES; connecting as user 'lock_all'; connected; GRANT LOCK TABLES ON *.* TO 'none'@'localhost'; LOCK TABLE upgrade_drop_me_db.upgrade_drop_me_tbl READ; ERROR 42000: SELECT command denied to user 'lock_all'@'localhost' for table 'upgrade_drop_me_tbl' UNLOCK TABLES; connecting as user 'root'; connected; GRANT SELECT ON upgrade_drop_me_db.* TO 'lock_all'@'localhost'; connecting to user 'lock-all'; connected LOCK TABLES upgrade_drop_me_db.upgrade_drop_me_tbl READ; UNLOCK TABLES; LOCK TABLES upgrade_drop_me_db.upgrade_drop_me_tbl WRITE; UNLOCK TABLES; REVOKE SELECT ON upgrade_drop_me_db.* FROM 'lock_all'@'localhost'; connecting to user 'none'; connected; LOCK TABLES upgrade_drop_me_db.upgrade_drop_me_tbl READ; ERROR 42000: Access denied for user 'none'@'localhost' to database 'upgrade_drop_me_db' LOCK TABLES upgrade_drop_me_db.upgrade_drop_me_tbl READ; UNLOCK TABLES; LOCK TABLES upgrade_drop_me_db.upgrade_drop_me_tbl WRITE; UNLOCK TABLES; connecting as user 'reload'; connected; GRANT RELOAD ON *.* TO 'none'@'localhost'; FLUSH HOSTS; FLUSH LOGS; FLUSH PRIVILEGES; FLUSH STATUS; FLUSH TABLES; connecting as user 'shutdown'; connected; GRANT SHUTDOWN ON *.* TO 'none'@'localhost'; connecting as user 'process'; connected; GRANT PROCESS ON *.* TO 'none'@'localhost'; KILL 3; ERROR HY000: You are not owner of thread 3 connecting to user 'none'; connected; connecting to user 'none'; connected; connecting as user 'file'; connected; GRANT FILE ON *.* TO 'none'@'localhost'; LOAD DATA INFILE '../tmp/privtest-outfile' INTO TABLE privdb.t1; ERROR 42000: INSERT command denied to user 'file'@'localhost' for table 't1' SELECT * FROM privdb.t1 INTO OUTFILE '../tmp/privtest-outfile'; ERROR 42000: SELECT command denied to user 'file'@'localhost' for table 't1' connecting to user 'root'; connected; GRANT SELECT, INSERT ON privdb.t1 TO 'file'@'localhost'; connecting to user 'file'; connected; SELECT * FROM privdb.t1 INTO OUTFILE '../tmp/privtest-outfile'; connecting as user 'root'; connected; DELETE FROM privdb.t1; connecting to user 'file'; connected; LOAD DATA INFILE '../tmp/privtest-outfile' INTO TABLE privdb.t1; REVOKE SELECT, INSERT ON privdb.t1 FROM 'file'@'localhost'; connecting to user 'none'; connected; SELECT * FROM privdb.t1 INTO OUTFILE '../tmp/privtest-outfile2'; DELETE FROM privdb.t1; LOAD DATA INFILE '../tmp/privtest-outfile2' INTO TABLE privdb.t1; SELECT * FROM privdb.t1; c1 English c3 1 blue 1 2 green 2 3 red 3 4 black 4 5 white 5 6 yellow 6 7 brown 7 8 orange 8 connecting as user 'none'; connected; GRANT SELECT ON upgrade_drop_me_db.* TO 'show_temp'@'localhost' IDENTIFIED BY 'show_temp'; connecting as 'show-temp' connected SHOW DATABASES like 'upgrade_drop_me_db'; Database (upgrade_drop_me_db) upgrade_drop_me_db SHOW DATABASES like 'privdb'; Database (privdb) connecting as user 'show_db'; connected; GRANT SHOW DATABASES ON *.* TO 'none'@'localhost'; connecting as user 'show_db'; connected; SHOW DATABASES like 'mysql'; Database (mysql) mysql SHOW DATABASES like 'privdb'; Database (privdb) privdb connecting as user 'none'; connected; GRANT SHOW DATABASES ON *.* TO show_temp; SHOW DATABASES LIKE 'privdb'; Database (privdb) privdb connecting as user 'none'; connected; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'show_temp'@'localhost'; DROP USER 'show_temp'@'localhost'; connecting as user 'super'; connected; GRANT SUPER ON *.* TO 'none'@'localhost'; KILL 3; connecting to user 'none'; connected; KILL 4; ERROR HY000: You are not owner of thread 4 connecting to user 'none'; connected; KILL 4; connecting as user 'repl_slave'; connected; GRANT REPLICATION SLAVE ON *.* TO 'none'@'localhost'; connecting as user 'repl_client'; connected; GRANT REPLICATION CLIENT ON *.* TO 'none'@'localhost'; connecting as user 'create_user'; connected; REVOKE CREATE USER ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT SELECT, SELECT (English), INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' connecting as user 'select_column'; connected; REVOKE SELECT (English) ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT SELECT, INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' connecting as user 'select_table'; connected; REVOKE SELECT ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' connecting as user 'select_db'; connected; REVOKE SELECT ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' connecting as user 'select_all'; connected; REVOKE SELECT ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' GRANT CREATE ON `privdb`.`new_table` TO 'none'@'localhost' connecting as user 'create_table'; connected; REVOKE CREATE ON privdb.new_table FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_db'; connected; REVOKE CREATE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_all'; connected; REVOKE CREATE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_rout_db'; connected; REVOKE CREATE ROUTINE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_rout_all'; connected; REVOKE CREATE ROUTINE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_view_db'; connected; REVOKE SELECT, CREATE VIEW ON privdb.* FROM 'none'@'localhost'; connecting as user 'none' connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'create_view_all'; connected; REVOKE CREATE VIEW ON *.* FROM 'none'@'localhost'; connecting as user 'none' connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'cre_temptbl_db'; connected; REVOKE CREATE TEMPORARY TABLES ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, EXECUTE, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'cre_temptbl_all'; connected; REVOKE CREATE TEMPORARY TABLES ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, EXECUTE, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'execute_db'; connected; REVOKE EXECUTE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'execute_all'; connected; REVOKE EXECUTE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, INSERT (English), UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'insert_column'; connected; REVOKE INSERT (English) ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INSERT, UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'insert_table'; connected; REVOKE INSERT ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT INSERT, UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'insert_db'; connected; REVOKE INSERT ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, INSERT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'insert_all'; connected; REVOKE INSERT ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), REFERENCES, REFERENCES (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'references_col'; connected; REVOKE REFERENCES (English) ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), REFERENCES, INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'references_tbl'; connected; REVOKE REFERENCES ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'references_db'; connected; REVOKE REFERENCES ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'references_all'; connected; REVOKE REFERENCES ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, UPDATE (English), INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'update_column'; connected; REVOKE UPDATE (English) ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT UPDATE, INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'update_table'; connected; REVOKE UPDATE ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT UPDATE, DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'update_db'; connected; REVOKE UPDATE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, UPDATE, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'update_all'; connected; REVOKE UPDATE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT INDEX, ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'index_table'; connected; REVOKE INDEX ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, INDEX, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'index_db'; connected; REVOKE INDEX ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, INDEX, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'index_all'; connected; REVOKE INDEX ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT SHOW VIEW ON `privdb`.`v1` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'show_view_tbl'; connected; REVOKE SHOW VIEW ON privdb.v1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, SHOW VIEW, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'show_view_db'; connected; REVOKE SHOW VIEW ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'show_view_all'; connected; REVOKE SHOW VIEW ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' GRANT ALTER ON `privdb`.`t1` TO 'none'@'localhost' connecting as user 'alter_table'; connected; REVOKE ALTER ON privdb.t1 FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, ALTER, LOCK TABLES, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'alter_db'; connected; REVOKE ALTER ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, LOCK TABLES, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'alter_all'; connected; REVOKE ALTER ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, LOCK TABLES, ALTER ROUTINE ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'alter_rout_db'; connected; REVOKE ALTER ROUTINE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'alter_rout_all'; connected; REVOKE ALTER ROUTINE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' GRANT DROP ON `privdb`.`drop_table` TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'drop_table'; connected; REVOKE DROP ON privdb.drop_table FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, DROP, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'drop_db'; connected; REVOKE DROP ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'drop_all'; connected; REVOKE DROP ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' GRANT DELETE ON `privdb`.`delete_table` TO 'none'@'localhost' connecting as user 'delete_table'; connected; REVOKE DELETE ON privdb.delete_table FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT DELETE, LOCK TABLES ON `privdb`.* TO 'none'@'localhost' connecting as user 'delete_db'; connected; REVOKE DELETE ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, DELETE, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT LOCK TABLES ON `privdb`.* TO 'none'@'localhost' connecting as user 'delete_all'; connected; REVOKE DELETE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION GRANT LOCK TABLES ON `privdb`.* TO 'none'@'localhost' connecting as user 'lock_db'; connected; REVOKE LOCK TABLES ON privdb.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'lock_all'; connected; REVOKE LOCK TABLES ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, RELOAD, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'reload'; connected; REVOKE RELOAD ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, SHUTDOWN, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'shutdown'; connected; REVOKE SHUTDOWN ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, PROCESS, FILE, ALTER, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'process'; connected; REVOKE PROCESS ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, FILE, ALTER, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'file'; connected; REVOKE FILE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, ALTER, SHOW DATABASES, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'show_db'; connected; REVOKE SHOW DATABASES ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, ALTER, SUPER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'super'; connected; REVOKE SUPER ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, ALTER, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'repl_client'; connected; REVOKE REPLICATION CLIENT ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, ALTER, REPLICATION SLAVE, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'repl_slave'; connected; REVOKE REPLICATION SLAVE ON *.* FROM 'none'@'localhost'; connecting as user 'none'; connected; SHOW GRANTS; Grants for none@localhost GRANT SELECT, ALTER, SHOW VIEW, ALTER ROUTINE ON *.* TO 'none'@'localhost' IDENTIFIED BY PASSWORD '*2D82C3018E3D7FE4AA8B2FC670844372381BF0EF' WITH GRANT OPTION connecting as user 'create_user'; connected; REVOKE USAGE ON *.* FROM 'none'@'localhost'; DROP USER 'none'@'localhost'; connecting as 'root' connected ALTER DEFINER = CURRENT_USER() VIEW privdb.v5 AS SELECT CURRENT_USER(); ####################################################### ## END TESTS FOR INITIAL STAGE ###################### ## Proceeding to UPGRADE STAGE ###################### #######################################################