новичок здесь - Проблема: невозможно установить удаленное соединение с mariadb (mysql) на centos7 с Mac или gscript - настройка: у меня есть 2 ламповых машины: одна тестовая (107) и другая производственная (35) 107 - centos6.5 с mysql (vps в цифровом океане) 35 - centos7 с mariadb-server-5.5.52-1.el7.x86_64 (вычислительный движок на gcloud) db, dbuser, dbpass и порт (3306) одинаковы на обеих машинах
-Что я пробовал: 1. https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/ my.cnf в 35 выглядит так:
[mysqld]
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
#skip-networking
bind-address = 0.0.0.0
[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
trusted (active)
target: ACCEPT
icmp-block-inversion: no
interfaces: eth0
sources:
services: http https
ports: 3306/tcp
protocols:
masquerade: no
forward-ports:
sourceports:
icmp-blocks:
rich rules:
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: dhcpv6-client http https ssh
ports: 3306/tcp
protocols:
masquerade: no
forward-ports:
sourceports:
icmp-blocks:
rich rules:
Я занимаюсь этим уже 3 дня, и я не близок к тому, чтобы понять это. любая помощь приветствуется. что мне не хватает?
Спасибо.
Через 3 дня поиска в Google и 45 минут спустя после публикации этого вопроса я понял и понял, что у gcloud также может быть брандмауэр, и вот, он есть, и я нашел этот документ:
https://cloud.google.com/solutions/mysql-remote-access#modify_the_default_firewall_rule
Я пошел и создал правило входа для tcp: 3306, и теперь я могу подключаться удаленно, и мой gscript обращается к экземпляру вычислительного движка моего gcloud.
Тут нужен праздник !!!
Надеюсь, это кому-то поможет.