MySQL从库read-only配置详解

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


试验过程:

主库授权ALL文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/database/mysql-read-only/


从库测试:
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/database/mysql-read-only/

主库授权select,insert,update,delete


从库测试:

主库配置:

从库测试:
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/database/mysql-read-only/

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

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

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

 
Byrd
  • by Published onJuly 15, 2014
  • 原文链接:https://note.t4x.org/database/mysql-read-only/
匿名

Comment

Anonymous

Slide puzzle verification.