首页 > 数据库 > MySQL > Innodb Read Only Mode
(1) Innodb can be run from read only media like DVD/CD etc
(2) User can explicitly set instance in read only mode though its on read-write media
Start server in Read Only Mode:"--innodb-read-only" boolean configuration parameter is introduced for starting server in read only mode. Server will not start in read only mode if it was not shutdown cleanly/safely earlier.
User must pass/set parameter which try to create file/log on read/write media. Else server will not start. Like , user will need to pass "--pid-file=
--read-only
1) When datadir is RW and server started with --read-only : root/super user have permission for operations. Other users will not have permission to change.
2) When datadir is on read only media and server started with --read-only : all operations blocked for users (including root).
--innodb-read-only
1) When datadir is RW and server started with --innodb-read-only :
a) No user will be able to modify. DCL(like create user/grant/revoke etc) commands will work for root user. (It's non innodb issue)
b) When both --read-only and --innodb-read-only are given, then --innodb-read-only takes effect.(As I checked that root user can not do DML/DDL but can perform DCL )
2) When datadir is on read only media and server started with --read-only : all operations blocked for users (including root).
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26812308/viewspace-1295097/ ,如需转载,请注明出处,否则将追究法律责任。