4017 Martin Skold 2010-12-15
WL#5482 Distribute MySQL Cluster Users: Updated HOWTO file
=== modified file 'HOWTO_distribute_privileges.txt'
--- a/HOWTO_distribute_privileges.txt 2010-12-15 10:40:24 +0000
+++ b/HOWTO_distribute_privileges.txt 2010-12-15 13:04:20 +0000
@@ -1,15 +1,15 @@
HOWTO distribute user privileges in a MySQL Cluster.
This text is a short description how to distribute MySQL
-privilege tables to all connect MySQL servers belonging to
+privilege tables to all connected MySQL servers belonging to
a MySQL Cluster. This enables adding and removing users to
the system as well as defining grants for various privileges
in a more or less transparent manner. Flushing of grants
might be needed to make changes visible on already opened
-The procedure is based on move the privilege tables from local
-storage (MyISAM) to distyributed storage (ndbcluster). To
+The procedure is based on moving the privilege tables from local
+storage (MyISAM) to distributed storage (ndbcluster). To
simplify the procedure a number of store procedures have been
defined to more or less automate the procedure.
The procedures can be loaded by:
@@ -17,21 +17,32 @@ The procedures can be loaded by:
IMPORTANT: Prior to performing the actual distribution it is recommended
to backup the current privilege tables, using for example mysqldump:
-mysqldump <connect-options> --user root mysql user db tables_priv columns_priv procs_priv
+"mysqldump <connect-options> --user root mysql user db tables_priv columns_priv procs_priv"
The actual procedure can be initiated by running the stored procedure
-mysql_cluster_move_privilege_tables once in any connected MySQL server:
+mysql_cluster_move_privilege_tables once on any connected MySQL server:
NOTE: This procedure will create two sets of backups of the privilege tables
as well, one local and one distributed. These are used to revert the tables
if anything goes wrong during the distribution process.
-To verify that the procedure was succesful one can do the following query:
+To verify that the procedure was successful one can do the following query:
-which should return 1 if procedure was succesful.
+which should return 1 if procedure was successful.
-NOTE: In case cluster being restarted with resetting of all tables (--inital)
+NOTE: If a MySQL server is disconnected from the cluster while the privilege
+tables are being moved the local privilege tables will need to be dropped and
+refreshed when the MySQL server has reconnected:
+drop table if exists user db tables_priv columns_priv procs_priv;
+In case cluster being restarted with resetting of all tables (--inital)
the privilege tables will be lost after the they have been moved. If no
MySQL server is available to revert the tables (either from the local backup
tables or from a mysqldump file). If a new MYSQL server needs to be connected
|• bzr commit into mysql-5.1-telco-7.1 branch (Martin.Skold:4017) WL#5482||Martin Skold||15 Dec|