config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb_rpl/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : /home/usr.opt/mysql57/mysql-test/suite/ndb_rpl/r/ndb_rpl_dist_priv.result

include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	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.
[connection master]
call mysql.mysql_cluster_move_privileges();
select mysql.mysql_cluster_privileges_are_distributed();
mysql.mysql_cluster_privileges_are_distributed()
1
CREATE TABLE t1 (pk INT PRIMARY KEY, a INT) engine = ndb;
CREATE USER 'user'@'localhost' IDENTIFIED by 'mypass';
GRANT UPDATE ON t1 TO 'user'@'localhost';
SET PASSWORD FOR 'user'@'localhost'= 'newpass';
RENAME USER 'user'@'localhost' TO 'newuser'@'localhost';
GRANT SELECT ON test.* TO 'newuser'@'localhost' IDENTIFIED by 'mypass2';
Warnings:
Warning	1287	Using GRANT statement to modify existing user's properties other than privileges is deprecated and will be removed in future release. Use ALTER USER statement for this operation.
CREATE USER 'user2'@'localhost' IDENTIFIED by 'mypass';
GRANT SELECT ON test.t1 TO 'user2'@'localhost';
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
newuser	*1E9649BB3F345563008E37641B407AFF50E5835C
root	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user2	Select
CREATE USER 'user'@'localhost';
grant ALL PRIVILEGES on test.* to user@localhost with GRANT OPTION;
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user2	Select
GRANT SELECT ON test.t1 TO 'user'@'localhost';
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user	Select
user2	Select
FLUSH PRIVILEGES;
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user	Select
user2	Select
REVOKE SELECT ON test.t1 FROM 'user'@'localhost';
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user2	Select
CREATE USER 'user3'@'localhost' IDENTIFIED by 'mypass';
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
newuser	*1E9649BB3F345563008E37641B407AFF50E5835C
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user2	Select
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
newuser	*1E9649BB3F345563008E37641B407AFF50E5835C
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
newuser	Update
user2	Select
FLUSH PRIVILEGES;
REVOKE UPDATE ON t1 FROM 'newuser'@'localhost';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user2'@'localhost';
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
GRANT SELECT (a) ON test.t1 TO 'user'@'localhost';
select User, Table_name, Column_name from mysql.columns_priv ORDER BY User;
User	Table_name	Column_name
user	t1	a
FLUSH PRIVILEGES;
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
newuser	*1E9649BB3F345563008E37641B407AFF50E5835C
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
user	
select User, Table_name, Column_name from mysql.columns_priv ORDER BY User;
User	Table_name	Column_name
user	t1	a
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
newuser	*1E9649BB3F345563008E37641B407AFF50E5835C
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
user	
select User, Table_name, Column_name from mysql.columns_priv ORDER BY User;
User	Table_name	Column_name
user	t1	a
DROP USER 'newuser'@'localhost';
== Showing binlog server1 ==
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; CREATE USER 'user'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
master-bin.000001	#	Query	#	#	use `test`; GRANT UPDATE ON `test`.`t1` TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; ALTER USER 'user'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*D8DECEC305209EEFEC43008E1D420E1AA06B19E0'
master-bin.000001	#	Query	#	#	use `test`; RENAME USER 'user'@'localhost' TO 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; GRANT SELECT ON `test`.* TO 'newuser'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*1E9649BB3F345563008E37641B407AFF50E5835C'
master-bin.000001	#	Query	#	#	use `test`; CREATE USER 'user2'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
master-bin.000001	#	Query	#	#	use `test`; GRANT SELECT ON `test`.`t1` TO 'user2'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; CREATE USER 'user'@'localhost' IDENTIFIED WITH 'mysql_native_password' PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
master-bin.000001	#	Query	#	#	use `test`; GRANT ALL PRIVILEGES ON `test`.* TO 'user'@'localhost' WITH GRANT OPTION
master-bin.000001	#	Query	#	#	use `test`; GRANT SELECT ON `test`.`t1` TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	REVOKE SELECT ON test.t1 FROM 'user'@'localhost'
master-bin.000001	#	Query	#	#	CREATE USER 'user3'@'localhost' IDENTIFIED by 'mypass'
master-bin.000001	#	Query	#	#	REVOKE UPDATE ON t1 FROM 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user2'@'localhost'
master-bin.000001	#	Query	#	#	GRANT SELECT (a) ON test.t1 TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; FLUSH PRIVILEGES
master-bin.000001	#	Query	#	#	DROP USER 'newuser'@'localhost'
== Showing binlog server2 ==
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	CREATE USER 'user'@'localhost' IDENTIFIED by 'mypass'
master-bin.000001	#	Query	#	#	GRANT UPDATE ON t1 TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	ALTER USER 'user'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*D8DECEC305209EEFEC43008E1D420E1AA06B19E0'
master-bin.000001	#	Query	#	#	RENAME USER 'user'@'localhost' TO 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.* TO 'newuser'@'localhost' IDENTIFIED by 'mypass2'
master-bin.000001	#	Query	#	#	CREATE USER 'user2'@'localhost' IDENTIFIED by 'mypass'
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.t1 TO 'user2'@'localhost'
master-bin.000001	#	Query	#	#	CREATE USER 'user'@'localhost'
master-bin.000001	#	Query	#	#	grant ALL PRIVILEGES on test.* to user@localhost with GRANT OPTION
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.t1 TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; FLUSH PRIVILEGES
master-bin.000001	#	Query	#	#	use `test`; REVOKE SELECT ON test.t1 FROM 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; CREATE USER 'user3'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
master-bin.000001	#	Query	#	#	use `test`; FLUSH PRIVILEGES
master-bin.000001	#	Query	#	#	use `test`; REVOKE UPDATE ON t1 FROM 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user2'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; GRANT SELECT (a) ON `test`.`t1` TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; DROP USER 'newuser'@'localhost'
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
user	
select distinct User,Authentication_string from mysql.user order by User;
User	Authentication_string
root	
user	
user2	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
user3	*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
select User,Table_priv from mysql.tables_priv ORDER BY User;
User	Table_priv
user	
BEGIN;
UPDATE mysql.user SET Authentication_string = ''
WHERE User = 'user2';
SET PASSWORD FOR 'user2'@'localhost' = 'newpass';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SHOW WARNINGS;
Level	Code	Message
Warning	1297	Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB
Error	1205	Lock wait timeout exceeded; try restarting transaction
Warning	1297	Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB
Warning	1297	Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB
Error	1205	Lock wait timeout exceeded; try restarting transaction
== Showing binlog server2 ==
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	CREATE USER 'user'@'localhost' IDENTIFIED by 'mypass'
master-bin.000001	#	Query	#	#	GRANT UPDATE ON t1 TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	ALTER USER 'user'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*D8DECEC305209EEFEC43008E1D420E1AA06B19E0'
master-bin.000001	#	Query	#	#	RENAME USER 'user'@'localhost' TO 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.* TO 'newuser'@'localhost' IDENTIFIED by 'mypass2'
master-bin.000001	#	Query	#	#	CREATE USER 'user2'@'localhost' IDENTIFIED by 'mypass'
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.t1 TO 'user2'@'localhost'
master-bin.000001	#	Query	#	#	CREATE USER 'user'@'localhost'
master-bin.000001	#	Query	#	#	grant ALL PRIVILEGES on test.* to user@localhost with GRANT OPTION
master-bin.000001	#	Query	#	#	GRANT SELECT ON test.t1 TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; FLUSH PRIVILEGES
master-bin.000001	#	Query	#	#	use `test`; REVOKE SELECT ON test.t1 FROM 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; CREATE USER 'user3'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
master-bin.000001	#	Query	#	#	use `test`; FLUSH PRIVILEGES
master-bin.000001	#	Query	#	#	use `test`; REVOKE UPDATE ON t1 FROM 'newuser'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user2'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; GRANT SELECT (a) ON `test`.`t1` TO 'user'@'localhost'
master-bin.000001	#	Query	#	#	use `test`; DROP USER 'newuser'@'localhost'
ROLLBACK;
=== making backup of new users ===
call mysql.mysql_cluster_backup_privileges();
==== clean up ====
DROP USER 'user2'@'localhost';
DROP USER 'user3'@'localhost';
DROP TABLE t1;
STOP SLAVE;
call mysql.mysql_cluster_backup_privileges();
call mysql.mysql_cluster_backup_privileges();
call mysql.mysql_cluster_backup_privileges();
call mysql.mysql_cluster_restore_local_privileges();
call mysql.mysql_cluster_restore_local_privileges();
call mysql.mysql_cluster_restore_local_privileges();

Man Man