Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How MySQL sets system variables

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces MySQL how to set system variables, the content of the article is carefully selected and edited by the author, with a certain pertinence, for everyone's reference significance is still relatively great, the following with the author to understand the next topic content.

System variables are divided into global variables and session variables. Global variables will affect the entire CVM. Session variables, on the other hand, only affect the current session (that is, the current database connection)

1 output global variables:

Mysql > show global variables

View a global variable:

Mysql > show global variables like "version"

+-+ +

| | Variable_name | Value |

+-+ +

| | version | 5.6.30 | |

+-+ +

Set the global variable:

Mysql > set global general_log=on; # permanent change, need to modify the configuration file

Query OK, 0 rows affected (0.35 sec)

2 output session variables:

Mysql > show variables; or

Mysql > show session variables

Set the session variable:

Mysql > set wait_timeout=1000

Query OK, 0 rows affected (0.00 sec)

After reading the above about how to set system variables in MySQL, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report