I ran into a problem, the max_connction value in MySQL is 214 after I set it to 1000 by editing my.cnf as shown below:
hadoop@node1 :~$ mysql -V mysql Ver 14.14 Distrib 5.7.15, for Linux (x86_64) using EditLine wrapper
MySQL Version: 5.7
OS Version: ubuntu 16.04LTS
mysql> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 151 | +-----------------+-------+ 1 row in set (0.00 sec)
As we can see, the variable max_connections value is 151. Then I edit the MySQL configuration file.
yang2@node1 :~$ sudo vi /etc/mysql/my.cnf [mysqld] character-set-server=utf8 collation-server=utf8_general_ci max_connections=1000
Restart the MySQL service after saving the configuration.
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 :~$
Now we assume that max_connection is 1000, really?
mysql> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 214 | +-----------------+-------+ 1 row in set (0.00 sec)
This is 214. I really do not understand this result, who can help me? THX!
source share