ERROR 1130 (HY000): Host ‘fdaa:3:8ad5:a7b:dc6:0:a:100’ is not allowed to connect to this MySQL server
I followed this instruction to set up my private network https://fly.io/docs/reference/private-networking/#private-network-vpn
This is my fly.toml file
app = "mysql-config"
kill_signal = "SIGINT"
kill_timeout = 5
primary_region = "lhr"
[processes]
app = "--datadir /data/mysql"
[mounts]
source="mysqldata"
destination="/data"
[env]
MYSQL_DATABASE = "config"
MYSQL_USER = "user"
[build]
image = "mysql:5.7"
Getting same error on my fly app
sqlMessage: “Host ‘fdaa:3:8ad5:a7b:13d:f218:3d68:2’ is not allowed to connect to this MySQL server”
I setup another db on heroku and I am able to connect it locally.
Does it work at all if you try connecting from within an SSH session?
fly ssh console -a mysql-config
mysql -u "$MYSQL_USER" "$MYSQL_DATABASE"
It may have ended up being configured to allow logins only from localhost
.
(Due to a glitch in the env vars (/ secrets ) early on—would be one initial theory.)
It works when I try to ssh.
How do I configure it to allow other IPs aside from localhost.
Glad that part worked for you, … The Stack Overflow link posted above has examples of the configuration tweaks (CREATE USER
and GRANT ALL PRIVILEGES
) as well as the explanation of the underlying “user@host
pairs” complication:
https://stackoverflow.com/questions/19101243/error-1130-hy000-host-is-not-allowed-to-connect-to-this-mysql-server
(You will want the wildcard variant (%
) for the host, since Fly addresses can change when you scale and the like.)
(And your user is user
instead of root
, of course.)
system
Closed
November 28, 2023, 10:18am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.