MySQL Cluster 共用許可權

來源:互聯網
上載者:User

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';  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.