Welcome 微信登录

首页 / 数据库 / MySQL / MySQL Cluster 共享权限

MySQL Cluster API节点 中mysql.user 表为MyISAM引擎,所以每个API都要配置权限系统,MySQL已经为我们提供了共享权限脚本。这个脚本主要作用就是将mysql.user 表MyISAM引擎更换为NDBCLUSTER引擎。以 linux - CentOS 单机 源码 编译 安装 mysql cluster 7.2.7 source install 为例,执行下面的脚本可以实现共享权限。
  1. #share privilege  
  2. /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  
  3. /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  
  4. /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  
  5. /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  
  6.   
  7. #one of cluster API  
  8. CALL mysql.mysql_cluster_move_privileges();  
  9. FLUSH PRIVILEGES;  
  10.   
  11. #init root password  
  12. /opt/soft/mysql-cluster-7.2.7/bin/mysqladmin -S/tmp/mysql3353.sock -u root password 123456  
  13.   
  14. #one of cluster API  
  15. delete from user where LENGTH(password)<10;  
  16.   
  17. #create user  
  18. GRANT ALL PRIVILEGES ON *.* TO "tudou"@"192.168.%" IDENTIFIED BY "123456";  
MySQL 5.5实时监控基于CentOSOracle Decode函数详解相关资讯      MySQL Cluster 
  • MySQL Cluster配置参数详解  (今 08:20)
  • MySQL Cluster7.4.12分布式集群搭  (08月25日)
  • MySQL集群之MySQL Cluster  (04月11日)
  • MySQL Cluster实现向正在运行的数  (08月25日)
  • Ubuntu下MySQL Cluster安装和配置  (04月11日)
  • MySQL教程:Linux下搭建MySQL   (02月01日)
本文评论 查看全部评论 (0)
表情: 姓名: 字数

版权所有©石家庄振强科技有限公司2024 冀ICP备08103738号-5 网站地图