The MySQL variable

Source: Internet
Author: User

MySQL variables:
Server variables:
Use parameters to change the MySQL run feature. The directive that is defined in the configuration file.

To view server variables:
mysql>show [GLOBAL] [SESSION] VARIABLES [like ' STRING '];
mysql> SELECT @@ global| [SESSION] STRING;

To modify a service variable:
Mysql>set global| SESSION string= ' VALUE ';

by Scope:
Global variables:
The variable has been in effect since the server started. No user settings are required.
Only users with full permissions can modify global variables.

Mysql>>show GLOBAL VARIABLES [like ' STRING '];


Session Variables:
Valid only for the current session and expire after the session is terminated.
Normal users can modify session variables.

Mysql>show [SESSION] VARIABLES [like ' STRING '];

According to the effective time division:
Dynamic adjustment:
It can be modified immediately and will take effect as soon as it is modified.

Global variables:
Invalid for the current session, only valid for newly established sessions.

Session Variables:
Takes effect immediately, but only valid for the current session.

Static adjustment:
The service needs to be restarted after the adjustment.
Can be written in a configuration file or passed to mysqld or mysqld-safe by parameters.

This article is from "Small Private blog" blog, please be sure to keep this source http://ggvylf.blog.51cto.com/784661/1679328

The MySQL variable

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.