生产授权方案1
my.cnf,指定read-only参数确保从库只读 [mysqld] read-only
生产授权方案2(不专业)
设置多套用户密码,指定权限加read-only web_r (select,insert,delete,updata) web_w (select)
生产授权方案3(推荐)
replicate-ignore-db=mysql //忽略mysql 库主从同步 binlog-ignore-db = mysql //忽略mysql 库主从同步 binlog-ignore-db = performance_schema //忽略performance_schema 库主从同步 binlog-ignore-db = information_schema //忽略information_schema库主从同步 binlog-do-db = testdb //只同步某一个库
停留在世界边缘,与之惜别