这是用yum安装mariadb后在etc里的my.cnf文件的配置,其中bind-address很重要,因为这个东西折腾了好久

这是用yum安装mariadb后在etc里的my.cnf文件的配置,其中bind-address很重要,因为这个东西折腾了好久

This group is read both by the client and the server

use it for options that affect everything

[client-server]

include *.cnf from the config directory

!includedir /etc/my.cnf.d

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
datadir = /var/lib/mysql
log-error = /var/log/mariadb/mariadb.log
bind-address = 0.0.0.0

pid-file = /var/run/mariadb/mariadb.pid

Set the default character set and collation

character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

Set the default storage engine

default-storage-engine = InnoDB

Set the default transaction isolation level

transaction-isolation = READ-COMMITTED

Set the default binlog format and location

binlog_format = ROW
log-bin = /var/lib/mysql/mysql-bin

Set the default max_allowed_packet size

max_allowed_packet = 64M

Set the default innodb_buffer_pool_size

innodb_buffer_pool_size = 128M

Set the default innodb_log_file_size

innodb_log_file_size = 64M

Set the default innodb_flush_log_at_trx_commit

innodb_flush_log_at_trx_commit = 1

Set the default innodb_file_per_table

innodb_file_per_table = 1


扫描二维码,在手机上阅读!

发表评论

电子邮件地址不会被公开。 必填项已用*标注