博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql8学习手册第四部分:mysql配置文件的使用和高级配置
阅读量:4094 次
发布时间:2019-05-25

本文共 1183 字,大约阅读时间需要 3 分钟。


第四章:Configuring Mysql

  • Using config file
  • Using global and session variables
  • Using parameters with startup script
  • Configuring the parameters
  • Changing the data directory

mysql有两种参数:Static(重启生效)和Dynamic(不用重启即可生效)

mysql变量设置:

  1. Config file

  2. Startup script

  3. Using SET command

  4. Using config file

    The default config file is /etc/my.cnf (on Red Hat and CentOS systems) and /etc/mysql/my.cnf (Debian systems)

mysql配置参考样例:

[mysqld] <---section name
=
<---parameter values[client]
=
[mysqldump]
=
[mysqld_safe]
=
[server]
=
  • [mysql] : Section is read by the mysql command-line client
  • [client] : Section is read by all connectingclients (including mysql cli )
  • [mysqld] : Section is read by the mysql server
  • [mysqldump] : The section is read by the backuputility called mysqldump
  • [mysqld_safe] : Read by the mysqld_safe process(MySQL Server Startup Script)
  1. Using global and session variables

Global: Applies to all the new connections

Session: Applies only to the current connection

SET GLOBAL long_query_time = 1;SET PERSIST long_query_time = 1;SET @@persist.long_query_time = 1;SET SESSION long_query_time = 1;

转载地址:http://ataii.baihongyu.com/

你可能感兴趣的文章
c++使用Eigen库计算矩阵特征值
查看>>
VS调试时查看动态数组的全部元素
查看>>
ls -l 每一列的含义
查看>>
安装广告拦截插件abp
查看>>
python处理打卡数据的excel表格
查看>>
Linux虚拟机与本地机共享文件夹
查看>>
[JS] 格式化时间长度(formatDuration)
查看>>
[JS] 变量提升
查看>>
[JS] 检查一个对象是否可迭代
查看>>
Java访问类中的私有成员(private member)
查看>>
输出一个集合所有子集的元素和(Print sums of all subsets of a given set)
查看>>
Java中的迭代器(Iterators in Java)
查看>>
Ubuntu 16.04中安装Vim 8.0
查看>>
Java中的迭代器(Iterators in Java)
查看>>
动态规划之最长公共子序列(Longest Common Subsequence)
查看>>
动态规划之编辑距离(Edit Distance)
查看>>
迭代的快速排序(Iterative Quick Sort)
查看>>
快速排序最坏的情况啥时候出现?
查看>>
动态规划之最小带权路径(Min Cost Path)
查看>>
给定链表中某个节点的指针,删除链表中的该节点
查看>>