GIF89a;
Direktori : /usr/share/mysql-test/suite/binlog/r/ |
Current File : //usr/share/mysql-test/suite/binlog/r/binlog_rewrite.result |
RESET MASTER; CREATE USER user1@localhost IDENTIFIED BY 'secret'; CREATE USER user2@localhost IDENTIFIED BY 'secret'; SET PASSWORD FOR user1@localhost = PASSWORD('secret'); # Test the password is encrypted in binary log # when granting privileges on tables. GRANT UPDATE ON *.* TO user1@localhost IDENTIFIED BY 'secret' WITH GRANT OPTION; GRANT UPDATE ON *.* /*before to*/TO/*after to*/ user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2' /*before with*/WITH/*after with*/MAX_QUERIES_PER_HOUR 90; GRANT UPDATE ON *.* /*before to*/TO/*after to*/ user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2' /*before require*/REQUIRE SSL/*after require*/ /*before with*/WITH/*after with*/MAX_QUERIES_PER_HOUR 90; GRANT UPDATE ON *.* TO user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2'; REVOKE UPDATE ON *.* FROM user1@localhost, user2@localhost; # Test the password is encrypted in binary log # when granting privileges on procedure. CREATE PROCEDURE p1() SQL SECURITY INVOKER SELECT 1; GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2' /*before with*/ WITH MAX_QUERIES_PER_HOUR 90; GRANT EXECUTE ON PROCEDURE p1 /*before to*/TO/*after to*/ user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2' /*before require*/REQUIRE SSL/*after require*/ /*before with*/WITH/*after with*/MAX_QUERIES_PER_HOUR 90; GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost IDENTIFIED BY 'secret', user2@localhost IDENTIFIED BY 'secret2'; REVOKE EXECUTE ON PROCEDURE p1 FROM user1@localhost, user2@localhost; # Test the password is encrypted in binary log # when granting privileges on function. CREATE FUNCTION f1() RETURNS INT RETURN 123; GRANT EXECUTE ON FUNCTION f1 /*before to*/TO/*after to*/ user1@localhost IDENTIFIED BY 'secret' /*!10000 , user2@localhost IDENTIFIED BY 'secret2' */ /*!99999 THIS_WOULD_BREAK */ /*before require*/REQUIRE SSL/*after require*/ /*before with*/WITH/*after with*/MAX_QUERIES_PER_HOUR 90; REVOKE EXECUTE ON FUNCTION f1 FROM user1@localhost, user2@localhost; DROP USER user1@localhost, user2@localhost; DROP FUNCTION f1; DROP PROCEDURE p1; GRANT ALL on *.* TO test_user1 IDENTIFIED BY 'azundris1'; CREATE USER test_user2 IDENTIFIED BY 'azundris2'; CHANGE MASTER TO MASTER_PASSWORD='azundris3'; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. CREATE USER 'test_user4'@'localhost'; SET PASSWORD FOR 'test_user4'@'localhost' = PASSWORD('azundris4'); include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE USER 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' master-bin.000001 # Query # # use `test`; CREATE USER 'user2'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'user1'@'localhost'='*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' master-bin.000001 # Query # # use `test`; GRANT UPDATE ON *.* TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' WITH GRANT OPTION master-bin.000001 # Query # # use `test`; GRANT UPDATE ON *.* TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' WITH MAX_QUERIES_PER_HOUR 90 master-bin.000001 # Query # # use `test`; GRANT UPDATE ON *.* TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' REQUIRE SSL WITH MAX_QUERIES_PER_HOUR 90 master-bin.000001 # Query # # use `test`; GRANT UPDATE ON *.* TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' master-bin.000001 # Query # # use `test`; REVOKE UPDATE ON *.* FROM user1@localhost, user2@localhost master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() SQL SECURITY INVOKER SELECT 1 master-bin.000001 # Query # # use `test`; GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' WITH MAX_QUERIES_PER_HOUR 90 master-bin.000001 # Query # # use `test`; GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' REQUIRE SSL WITH MAX_QUERIES_PER_HOUR 90 master-bin.000001 # Query # # use `test`; GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' master-bin.000001 # Query # # use `test`; REVOKE EXECUTE ON PROCEDURE p1 FROM user1@localhost, user2@localhost master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) RETURN 123 master-bin.000001 # Query # # use `test`; GRANT EXECUTE ON FUNCTION `test`.`f1` TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '*14E65567ABDB5135D0CFD9A70B3032C179A49EE7','user2'@'localhost' IDENTIFIED BY PASSWORD '*305D7BCA9D65D8D5C4677F05CD2EA2EBE350158F' REQUIRE SSL WITH MAX_QUERIES_PER_HOUR 90 master-bin.000001 # Query # # use `test`; REVOKE EXECUTE ON FUNCTION f1 FROM user1@localhost, user2@localhost master-bin.000001 # Query # # use `test`; DROP USER user1@localhost, user2@localhost master-bin.000001 # Query # # use `test`; DROP FUNCTION f1 master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1 master-bin.000001 # Query # # use `test`; GRANT ALL PRIVILEGES ON *.* TO 'test_user1'@'%' IDENTIFIED BY PASSWORD '*8D15E74BC850D11573A52BE84B504DD0BA40C1E3' master-bin.000001 # Query # # use `test`; CREATE USER 'test_user2'@'%' IDENTIFIED BY PASSWORD '*A142844DBF024D282D88FE19CB4D3FA13B1E96E0' master-bin.000001 # Query # # use `test`; CREATE USER 'test_user4'@'localhost' master-bin.000001 # Query # # use `test`; SET PASSWORD FOR 'test_user4'@'localhost'='*F62B91C8AD3D5D0BBF02A761A179EA3A66B060EC' DROP USER 'test_user4'@'localhost'; DROP USER test_user2; DROP USER test_user1; End of 5.6 tests!