Configuring InnoDB for Read-Only Operation How to Enable Usage Scenarios Note How It Works • --innodb-read-only=1 •If the instance is on read-only media such as a DVD or CD, or the  /var  directory is not writeable by all: --pid-file= path_on_writeable_media  and  --event-scheduler=disabled • --innodb-temp-data-file-path . This option specifies the path, file name, and file size for  InnoDB temporary tablespace data files. The default setting is  ibtmp1:12M:autoextend , which creates the  ibtmp1  temporary tablespace data file in the data directory. To prepare an instance for read-only operation, set  innodb_temp_data_file_path  to a location outside of the data directory. The path must be relative to the data directory. For example: •Distributing a MySQL application, or a set of MySQL data, on a read-only storage medium such as a DVD or CD. •Multiple MySQL instances querying the same data directory simultaneously, typically in a data warehousing configuration. You might use this technique to avoid bottlenecks that can occur with a heavily loaded MySQL instance, or you might use different configuration options for the various instances to tune each one for particular kinds of queries. •Querying data that has been put into a read-only state for security or data integrity reasons, such as archived backup data. When the server is run in read-only mode through the  --innodb-read-only  option, certain  InnoDB features and components are reduced or turned off entirely: This feature is mainly intended for flexibility in distribution and deployment, rather than raw performance based on the read-only aspect. See Section 8.5.3, “Optimizing InnoDB Read-Only Transactions”  for ways to tune the performance of read-only queries, which do not require making the entire server read-only. This mode of operation is appropriate in situations such as: In addition, other tables in the  mysql  system database use the  InnoDB  storage engine in MySQL 8.0. Making those tables read only results in restrictions on operations that modify them. For example,  CREATE USER ,  GRANT ,  REVOKE , and  INSTALL PLUGIN  operations are not permitted in read-only mode. As of MySQL 8.0, enabling  innodb_read_only  prevents table creation and drop operations for all storage engines. These operations modify data dictionary tables in the  mysql  system database, but those tables use the  InnoDB  storage engine and cannot be modified when  innodb_read_only  is enabled. The same restriction applies to any operation that modifies data dictionary tables, such as  ANALYZE TABLE and  ALTER TABLE  tbl_name  ENGINE= engine_name . To enable read-only mode for an entire MySQL instance, specify the following configuration options at server startup: To prepare an instance for read-only operation, make sure all the necessary information is flushed to the data files before storing it on the read-only medium. Run the server with change buffering disabled ( innodb_change_buffering=0 ) and do a slow shutdown. 3109 --innodb-temp-data-file-path=../../../tmp/ibtmp1:12M:autoextend