标签:修改 tor version 生效 connect 版本 none variable nod
? MySQL用很多常用的内置变量,掌握这些内置变量后对于我们快速获取当前MySQL的配置有很大帮助,下面就来列举几个常用的变量。
show variables like ‘version‘;
MariaDB [(none)]> show variables like 'version';
+---------------+----------------+
| Variable_name | Value |
+---------------+----------------+
| version | 5.5.60-MariaDB |
+---------------+----------------+
1 row in set (0.00 sec)
show variables like ‘port‘;
MariaDB [(none)]> show variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)
show variables like ‘datadir‘;
MariaDB [(none)]> show variables like 'datadir';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| datadir | /var/lib/mysql/ |
+---------------+-----------------+
1 row in set (0.00 sec)
show variables like ‘storage_engine‘;
MariaDB [(none)]> show variables like 'storage_engine';
+----------------+--------+
| Variable_name | Value |
+----------------+--------+
| storage_engine | InnoDB |
+----------------+--------+
1 row in set (0.01 sec)
show variables like ‘max_connections‘;
MariaDB [(none)]> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set (0.00 sec)
修改max_connectionis变量值:
MariaDB [(none)]> set global max_connections=65535;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 65535 |
+-----------------+-------+
1 row in set (0.00 sec)
? 掌握一些必要的变量后发现在使用过程中修改,是不用重启MySQL服务的,这样我们可以先进入MySQL将最大连接数进行修改,后续加入到配置文件中,选择维护时间将MySQL重启,配置就可以永久生效了。
标签:修改 tor version 生效 connect 版本 none variable nod
原文地址:https://www.cnblogs.com/Cherry-Linux/p/10337855.html