Max_connections в MySQL 5.7
Я столкнулся с проблемой, значение max_connction в MySQL равно 214 после того, как я установил его 1000 через редактирование my.cnf, как показано ниже:
hadoop@node1:~$ mysql -V
mysql Ver 14.14 Distrib 5.7.15, for Linux (x86_64) using EditLine wrapper
Версия MySQL: 5.7
Версия ОС: Ubuntu 16.04LTS
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set (0.00 sec)
Как мы видим, значение переменной max_connections равно 151. Затем я редактирую файл конфигурации MySQL.
yang2@node1:~$ sudo vi /etc/mysql/my.cnf
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
max_connections=1000
Перезапустите службу MySQL после сохранения конфигурации.
yang2@node1:~$ service mysql restart
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'mysql.service'.
Multiple identities can be used for authentication:
1. yangqiang,,, (yang2)
2. ,,, (hadoop)
Choose identity to authenticate as (1-2): 1
Password:
==== AUTHENTICATION COMPLETE ===
yang2@node1:~$
Теперь мы предполагаем, что max_connection равно 1000, правда?
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 214 |
+-----------------+-------+
1 row in set (0.00 sec)
Это 214. Я не очень понимаю этот результат, кто может мне помочь? Спасибо!