By default, the mysql users/privileges tables are MyISAM, not ndbcluster. 
ndb_mgm backup won't backup anything other than ndbcluster  tables. The 
--restore-privilege-tables only works if you've converted those user and 
privileges tables to ndbcluster.

>From the manual: 
>http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-programs-ndb-restore.html#option_ndb_restore_restore-privilege-tables

"--restore-privilege-tables

ndb_restore does not by default restore distributed MySQL privilege tables 
(MySQL Cluster NDB 7.2.0 and later). This option causes ndb_restore to restore 
the privilege tables.

This works only if the privilege tables were converted to NDB before the backup 
was taken."

I have been using this setup and it works well: 
http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-privilege-distribution.html

It basically creates backups of the user and privileges tables, then converts 
them to ndbcluster. This allows you to back them up through ndb_mgm and also 
allows you to use the same users/privileges across all the SQL nodes in the 
cluster. Hope this helps.





-----Original Message-----
From: Bheemsen Aitha [mailto:pgb...@motorola.com]
Sent: Tuesday, October 30, 2012 12:09 AM
To: mysql@lists.mysql.com
Subject: ndb_restore is not restoring users and grants

Hi,

I was able to backup my cluster using ndb_mgm and also restore using 
ndb_restore. However, when everything looks fine after restore, I see that 
users and grants are not restored. So, does ndb_restore restore all databases 
including information_schema and mysql databases, plus users and grants? Am I 
missing something? Do I need to do anything after restore step?

here are the commands I used for restore.

ndb_restore -c hostname -s -n 1 -m -b 3 -r --restore-privilege-tables=true 
--backup_path=/opt/app/mysql_data01/ndb_backup/BACKUP/BACKUP-3/
ndb_restore -c hostname -s -n 2 -b 3 -r --restore-privilege-tables=true 
--backup_path=/opt/app/mysql_data02/ndb_backup/BACKUP/BACKUP-3/

I really appreciate any help on this.

Thanks
-bheem

________________________________

Notice: This communication may contain privileged and/or confidential 
information. If you are not the intended recipient, please notify the sender by 
email, and immediately delete the message and any attachments without copying 
or disclosing them. LBI may, for any reason, intercept, access, use, and 
disclose any information that is communicated by or through, or which is stored 
on, its networks, applications, services, and devices.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql

Reply via email to