メタデータの末尾にスキップ
メタデータの先頭に移動

Exporting Permissions With clustrix_clone_users

User accounts and their permissions can be migrated using the clustrix_clone_users script, available on the Clustrix Support Forums here. The tool queries a MySQL or ClustrixDB and generates a set of GRANT statements, which can be run to reproduce the set of user accounts and permissions on another cluster (or MySQL instance): 

./clustrix_clone_users -H mysqlhost -u root > user_dump.sql
mysql -u root -h clx < user_dump.sql

Note that the use of GRANT or CREATE USER queries are the only way to create users; it is not possible to write the users table directly in the system database.  ClustrixDB ignores the `mysql` database, if you happen to import it as part of a larger mysqldump. 

Default root Account

ClustrixDB automatically creates a root user account.  In appliance configurations, this root user has no password.  For software configurations, the GUI installation wizard will prompt you to enter a root password (note that this is distinct from the UI admin user account password). 

Note that this root user is root@'%', that is, root logging in from anywhere.  This differs from MySQL, which creates a default root user of root@localhost. Moreover, when exporting users from MySQL using clustrix_clone_users, root users are not included (to avoid inadvertently locking oneself out of the database).

This difference in default root users between MySQL and ClustrixDB can lead to issues when importing triggers.  If a trigger happened to be created by the default root@localhost user on MySQL, it may import but then fail to execute on ClustrixDB, with an error like:

ERROR 1449 (HY000): [11309] The user specified as the definer for the trigger

This is because the trigger definition has DEFINER=`root`@`localhost` and ClustrixDB does not map this to the root@'%' user.  The simplest way to work around this is to create a root@localhost user on ClustrixDB.

  • ラベルなし
TOP
inserted by FC2 system