MySQL view global variables and set values for global variables

Source: Internet
Author: User
Tags mysql view

1. View the values of all global variables for MySQL

SHOW GLOBAL VARIABLES

Or
SHOW VARIABLES

MySQL has a lot of global variables, including some basic information about the system, and some basic configuration of MySQL can be found in the global variables.

2. View the value of a single global variable for MySQL

' Wait_timeout '

The above query can also use fuzzy query, the same as the above results of the fuzzy query statement

' wait_time% '  '%wait%'

Note: It is also possible to view the global variables of MySQL without adding the global keyword, for example

SHOW variablesshow   ' %wait% ' SHOW   ' Wait_timeout ' SHOW   ' %wait% '

3. Setting the value of a global variable

SET GLOBAL  604800604800
SET GLOBAL Event_scheduler ==11

MySQL view global variables and set values for global variables

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.