MySQL Cluster API节点 中mysql.user 表为MyISAM引擎,所以每个API都要配置权限系统,MySQL已经为我们提供了共享权限脚本。这个脚本主要作用就是将mysql.user 表MyISAM引擎更换为NDBCLUSTER引擎。
以linux - Centos 单机 源码 编译 安装 mysql cluster 7.2.7 source install为例,执行下面的脚本可以实现共享权限。
tudou@b2c.xiaomi.com
#share privilege
/opt/soft/mysql-cluster-7.2.7/bin/mysql -S/tmp/mysql3350.sock </opt/soft/mysql-cluster-7.2.7/share/ndb_dist_priv.sql
/opt/soft/mysql-cluster-7.2.7/bin/mysql -S/tmp/mysql3351.sock </opt/soft/mysql-cluster-7.2.7/share/ndb_dist_priv.sql
/opt/soft/mysql-cluster-7.2.7/bin/mysql -S/tmp/mysql3352.sock </opt/soft/mysql-cluster-7.2.7/share/ndb_dist_priv.sql
/opt/soft/mysql-cluster-7.2.7/bin/mysql -S/tmp/mysql3353.sock </opt/soft/mysql-cluster-7.2.7/share/ndb_dist_priv.sql
#one of cluster API
CALL mysql.mysql_cluster_move_privileges();
FLUSH PRIVILEGES;
#init root password
/opt/soft/mysql-cluster-7.2.7/bin/mysqladmin -S/tmp/mysql3353.sock -u root password 123456
#one of cluster API
delete from user where LENGTH(password)<10;
#create user
GRANT ALL PRIVILEGES ON *.* TO 'tudou'@'192.168.%' IDENTIFIED BY '123456';原文链接:
http://blog.youkuaiyun.com/ylqmf/article/details/7866517
本文详细介绍了如何使用共享权限脚本将 MySQL user 表从 MyISAM 引擎迁移到 NDBCluster 引擎,并通过 Linux CentOS 单机源码编译安装 MySQL Cluster 实现权限系统的配置。
723

被折叠的 条评论
为什么被折叠?



