Home > Database > Mysql Tutorial > body text

MySQL 修改参数

WBOY
Release: 2016-06-07 15:40:09
Original
1089 people have browsed it

新的参数生效 这些参数的改变在重启MYSQL服务的时候,都将失效复原,如果想要重启的时候也载入,则需要修改配置文件。 修改全局变量 mysql show variables like '%sort_buffer_size%'; --------------------------------------- | Variable_name | Value | -

新的参数值生效 这些参数的改变在重启MYSQL服务的时候,都将失效复原,如果想要重启的时候也载入,则需要修改配置文件。

修改全局变量

mysql> show variables like '%sort_buffer_size%';       
+---------------------------+------------+
| Variable_name             | Value      |
+---------------------------+------------+
| sort_buffer_size          | 6291448    |
+---------------------------+------------+
1 rows in set (0.00 sec)

用set GLOBAL 命令设置全局变量

mysql> set GLOBAL sort_buffer_size = 7000000;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%sort_buffer_size%';        
+---------------------------+------------+
| Variable_name             | Value      |
+---------------------------+------------+
| sort_buffer_size          | 6291448    |
+---------------------------+------------+


参考文章:http://blog.csdn.net/turkeyzhou/article/details/5741626

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!