server.cnf에 대한 my.cnf에서 skip-name-resolve?를 추가할 위치는 어디입니까?
올바른 파일을 편집하는 데 도움이 필요합니다.나는 my.cnf 파일에 "syslog-name-syslog=1"을 추가하고 싶습니다.저는 centos7과 mariadb 10.5를 사용하고 있습니다.
/etc/my.cnf에서 파일을 찾았습니다.내용은 다음과 같습니다.
[mysqld]
bind-address = ::ffff:127.0.0.1
local-infile=0
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
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
마지막 줄 "! includedir /etc/my.cnf.d"와 느낌표에 어려움을 겪고 있습니다.my.cnf.di 폴더에는 다음 파일이 있습니다.
-rw-r--r-- 1 root root 295 Nov 2 12:37 client.cnf
-rw-r--r-- 1 root root 763 Nov 2 12:37 enable_encryption.preset
-rw-r--r-- 1 root root 232 Nov 2 12:37 mysql-clients.cnf
-rw-r--r-- 1 root root 157 Nov 1 21:13 plesk-utf8mb4.cnf
-rw-r--r-- 1 root root 1080 Nov 2 12:37 server.cnf
-rw-r--r-- 1 root root 120 Nov 2 12:37 spider.cnf
이 파일이 includeir 안에 있기 때문에 server.cnf에 "syslog-name-syslog=1"을 추가해야 합니까?아니면 line socket=... 뒤에 my.cnf에 추가해야 했나요?
server.cnf에도 [mysqld]가 있기 때문입니다.
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
#
# * Galera-related settings
#
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.5]
1.ps -ef|grep mysql
지금 사용 중인 my.cnf 파일을 볼 수 있습니다.
데이터베이스 서비스를 중지하고 vimy.cnf에 매개 변수를 추가합니다.
skip-name-resolve
테스트를 위해 데이터베이스를 시작합니다.
구성을 위해 server.cnf 파일에 저장합니다.
구성 파일은 /etc/my.cnf에서 ~/.my.cnf 사용자에게 특정 순서로 읽힙니다.운영 체제의 현재 주문은 이 MariaDB 문서를 참조하십시오.MySQL/MariaDB는 이러한 구성 파일을 순서대로 읽을 때 마지막 값 집합을 읽습니다.
includeir 아래의 파일은 알파벳 순으로 읽힙니다.
구성 값을 인쇄하여 구성 파일 집합에 의해 설정되는 내용을 확인할 수도 있습니다.
언급URL : https://stackoverflow.com/questions/74784350/where-to-add-skip-name-resolve-in-my-cnf-or-server-cnf
'sourcecode' 카테고리의 다른 글
시스템입니다.웹.캐싱 또는 시스템.런타임.캐시는 에 적합합니다.NET 4 웹 애플리케이션 (0) | 2023.08.02 |
---|---|
해쉬방? 안 해쉬방? (0) | 2023.08.02 |
고유한 제약 조건을 위반하지 않고 MySQL에서 두 행의 값을 교환하는 방법은 무엇입니까? (0) | 2023.08.02 |
Android 디자인 지원 라이브러리 확장 가능 부동 액션 버튼(FAB) 메뉴 (0) | 2023.08.02 |
Android 앱과 웹 서버 간의 데이터 동기화 (0) | 2023.08.02 |