Как изменить max_connections MySQL

max_connections

Как изменить max_connections MySQL

show variables like “max_connections”;

set global max_connections = 200;

Для постоянного изменения вам необходимо отредактировать конфигурационный файл my.cnf

common-session

# here are the per-package modules (the "Primary" block)
session [default=1]         pam_permit.so
# here's the fallback if no module succeeds
session requisite           pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
session required            pam_permit.so
# and here are more per-package modules (the "Additional" block)
session required    pam_unix.so
session required    pam_limits.so
# end of pam-auth-update config

limits.conf

#<domain>      <type>  <item>         <value>
* soft  nofile 65536
* hard  nofile 65536
* soft  nproc  100000
* hard  nproc  127466