Die max_connections in MySQL 5.7

Ich bin auf ein Problem gestoßen, der Wert von max_connection in MySQL ist 214, nachdem ich ihn auf 1000 gesetzt habe, indem ich die Datei my.cnf bearbeit

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)

Wie wir sehen können, ist der variable Wert von max_connections 151. Dann bearbeite ich die Konfigurationsdatei von MySQL.

yang2@node1:~$ sudo vi /etc/mysql/my.cnf
[mysqld]

character-set-server=utf8
collation-server=utf8_general_ci
max_connections=1000

Starten Sie den MySQL-Dienst neu, nachdem Sie die Konfiguration gespeichert haben.

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:~$ 

Nun, wir vermuten, die max_connection ist 1000, wirklich?

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 214   |
+-----------------+-------+
1 row in set (0.00 sec)

It is 214. Ich verstehe dieses Ergebnis nicht wirklich, wer kann mir helfen? Danke

Antworten auf die Frage(8)

Ihre Antwort auf die Frage