MySQL从库read-only配置详解

    Read

为了防止用户对从库进行插入,采用read-only参数:
配置:


试验过程:

主库授权ALLSourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/


从库测试:
SourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/

主库授权select,insert,update,delete


从库测试:

主库配置:

从库测试:
SourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/

结论:当用户权限中没有SUPER权限(ALL权限是包括SUPER的)时,从库的read-only生效!SourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/

申明:本文由BYRD原创(基于Mysql5.6.16),未经许可禁止转载!SourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/ SourceByrd's Weblog-https://note.t4x.org/database/mysql-read-only/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on July 15, 2014
  • 原文链接:https://note.t4x.org/database/mysql-read-only/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: