mariadb系统变量之(一)通用配置

1. 数据目录指令:datadir

  • Description: Directory where the data is stored.
  • Commandline: --datadir=path or -h path
  • Scope: Global
  • Dynamic: No
  • Type: directory name

2. pid文件位置:pid_file

  • Description: Full path of the process ID file.
  • Commandline: --pid-file=file_name
  • Scope: Global
  • Dynamic: No
  • Data Type: file name

3. 服务器端字符集:character_set_server = utf8

  • Description: Default character set used by the server. See character_set_database for character sets used by the default database. Defaults may be different on some systems, see for example Differences in MariaDB in Debian.
  • Commandline: --character-set-server
  • Scope: Global, Session
  • Dynamic: Yes
  • Data Type: string
  • Default Value: latin1

4. 存储引擎配置:default_storage_engine = InnoDB

  • Description: The default storage engine. The default storage engine must be enabled at server startup or the server won't start.
  • Commandline: --default-storage-engine=name
  • Scope: Global, Session
  • Dynamic: Yes
  • Type: enumeration
  • Default Value: InnoDB (>= MariaDB 5.5), MyISAM (<MariaDB 5.3)
  • Introduced: MariaDB 5.5 (previously storage_engine)

5.  每个表是否有独立的表空间:innodb_file_per_table = on

6. 是否跳过域名解析:skip_name_resolve = on

  • Description: If set to 1 (0 is the default), only IP addresses are used for connections. Host names are not resolved. All host values in the GRANT tables must be IP addresses (or localhost).
  • Commandline: --skip-name-resolve
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value: 0

7. 表名大小写配置:lower_case_table_names = 1

  • Description: If set to 0 (the default on Unix-based systems), table names and aliases and database names are compared in a case-sensitive manner. If set to 1 (the default on Windows), names are stored in lowercase and not compared in a case-sensitive manner. If set to 2 (the default on Mac OS X), names are stored as declared, but compared in lowercase.
  • Commandline: --lower-case-table-names[=#]
  • Scope: Global
  • Dynamic: No
  • Data Type: numeric
  • Default Value: 0 (Unix), 1 (Windows), 2 (Mac OS X)
  • Range: 0 to 2

Reference: 

1. https://mariadb.com/kb/en/library/server-system-variables

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值