Get the App
SLTechnology News&Howtos  ›  Servers  › 

MySQL5.7.28 configuration file writing

Shulou Source: shulou.com Published: 2022-06-03 10:02:19 11月15日 Update

By default, either the MySQL service or the client reads / etc/my.cnf as the configuration file unless default-file is specified

[mysqld]

Port=3306

Innodb_file_format=barracuda

Innodb_large_prefix=on

Lower_case_table_names=1

Sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Datadir=/var/lib/mysql

Socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks

Symbolic-links=0

# Settings user and group are ignored when systemd is used.

# If you need to run mysqld under a different user or group

# customize your systemd unit file for mariadb according to the

# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]

Log-error=/var/log/mariadb/mariadb.log

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

Ma

#

# include all files from the config directory

#

! includedir / etc/my.cnf.d

[client]

Port=3306

Socket=/var/lib/mysql/mysql.sock

Tags: File configuration customer client situation Service Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn MariaDB Linux Shulou Technology