鍍金池/ 問答/數(shù)據(jù)庫  網(wǎng)絡安全/ mysql 并發(fā)操作

mysql 并發(fā)操作

innodb_thread_concurrency、innodb_thread_sleep_delay、innodb_concurrency_tickets、innodb_commit_concurrency。

這些參數(shù)是在哪里設置的?

回答
編輯回答
念舊

可以在my.cnf設置
my.cnf 可能在etc/my.cnf或者/usr/share/mysql或者自己mysql安裝的目錄

2017年3月6日 22:31
編輯回答
九年囚

這幾個是mysql的系統(tǒng)變量

設置兩種情況:會話級設置和全局系統(tǒng)級設置

1.會話級設置

查看變量值

show variables like "%innodb_thread_concurrency%"

設置變量值

set innodb_thread_concurrency=128;

2.全局系統(tǒng)級設置

需要修改配置文件,linux系統(tǒng)下默認是my.cnf文件,windows系統(tǒng)下默認是my.ini文件,具體路徑要看安裝的情況

在配置文件的[mysqld] 服務器端設置項中,修改對應的四個變量值即可

[mysqld]
innodb_thread_concurrency=128
2018年6月2日 15:36