问题原文
原帖链接 · gummipunkt · CC BY-SA 3.0
My Ghost instance want to conntect to my MariaDB, but the error is:
Message: 'ER_HOST_NOT_PRIVILEGED: Host '127.0.0.1' is not allowed to connect to this MariaDB server'
Here my 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
社区高分解答
原帖链接 · Michael Hampton · CC BY-SA 3.0
I suspect that your problem is that you've set skip-name-resolve.
By default, the MySQL/MariaDB user database contains only entries that allow access from localhost. But if you skip name resolution, then MySQL doesn't translate your connection from 127.0.0.1 to localhost, and thus can't match your connection to any host that's allowed to connect.
Remove skip-name-resolve and try again.
If you really want to keep this option, you'll need to create MySQL users who can connect from ::1 (and 127.0.0.1 if you still use IPv4) while skip-name-resolve is disabled, and then re-enable it.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
