How can I set the max number of MySQL processes or threads?

后端 未结 4 1993
失恋的感觉
失恋的感觉 2021-02-03 22:48

ps axuw| grep mysql indicates only MySQL process, but if I run htop I can see 10 rows each one of them with a separate PID. So I wonder if they are threads or proce

4条回答
  •  醉酒成梦
    2021-02-03 23:24

    You can set the max number of threads in your my.ini like this:

    max_connections=2
    

    However you might also want to set this:

    thread_cache_size=1
    

    The thread cache controls how many it keeps open even when nothing is happening.

提交回复
热议问题