
내 Ghost 인스턴스가 MariaDB에 연결하려고 하는데 오류는 다음과 같습니다.
Message: 'ER_HOST_NOT_PRIVILEGED: Host '127.0.0.1' is not allowed to connect to this MariaDB server'
여기 내 my.cnf가 있습니다.
[server]
skip-name-resolve
innodb_buffer_pool_size = 128M
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
query_cache_type = 1
query_cache_limit = 2M
query_cache_min_res_unit = 2k
query_cache_size = 64M
tmp_table_size= 64M
max_heap_table_size= 64M
slow-query-log = 1
slow-query-log-file = /var/log/mysql/slow.log
long_query_time = 1
bind-address = 127.0.0.1
[client-server]
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
[client]
default-character-set = utf8mb4
[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
binlog_format = MIXED
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_file_per_table=1
답변1
귀하의 문제는 귀하가 skip-name-resolve
.
기본적으로 MySQL/MariaDB 사용자 데이터베이스에는 에서 액세스를 허용하는 항목만 포함되어 있습니다 localhost
. 그러나 이름 확인을 건너뛰면 MySQL은 연결을 에서 로 변환하지 않으므로 127.0.0.1
연결 localhost
이 허용된 호스트와 연결을 일치시킬 수 없습니다.
제거 skip-name-resolve
하고 다시 시도해 보세요.
이 옵션을 정말로 유지하려면 이 옵션이 비활성화된 동안 연결할 수 있는 ::1
(그리고 127.0.0.1
여전히 IPv4를 사용하는 경우) MySQL 사용자를 생성한 skip-name-resolve
다음 다시 활성화해야 합니다.