问题
I'm trying to increase thread-stack variable. I can do it successfully using command-line option as such:
/usr/sbin/mysqld --thread-stack=256k
I can also do it using configuration files /etc/init/mysql.conf or /etc/init.d/mysql:
thread_stack=262144
thread_stack=256k
thread-stack=256k
thread-stack=262144
However, setting through /etc/mysql/my.cnf doesn't work. show variables like'%thread_stack%'; still shows the default 196608.
Why does setting through /etc/mysql/my.cnf not work?
How do I fix this?
(MySQL 5.5, 5.5.38-0ubuntu0.14.04.1-log.)
回答1:
The issue was multiple processes(threads) running for mysql. The output of pgrep in the question led me to use kill -15 -1.
This kills all the active processes for applications. Then I had to restart mysql and apache and I had the value updated.
来源:https://stackoverflow.com/questions/25762491/could-not-set-thread-stack-size-in-mysql