简体   繁体   中英

Variable 'innodb_lock_wait_timeout' is a read only variable

I want to change innodb_lock_wait_timeout MySQL variable. I tried using this command

set innodb_lock_wait_timeout=900;

but when I ran this I got the following error:

ERROR 1238 (HY000): Variable 'innodb_lock_wait_timeout' is a read only variable

Default @@innodb_lock_wait_timeout is 50 but I want to change it to 900.

How can I do this?

innodb_lock_wait_timeout can be set at runtime with the SET GLOBAL or SET SESSION statement. Changing the GLOBAL setting requires the SUPER privilege and affects the operation of all clients that subsequently connect. Any client can change the SESSION setting for innodb_lock_wait_timeout, which affects only that client.

You may also change the config file my.cnf and add innodb_lock_wait_timeout=900.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM