Closed MaraScott closed 1 year ago
It's likely because the engine is running in Docker and can't access your host loopback interface (if you're running MySQL on 127.0.0.1). Can you try running MySQL on 0.0.0.0 and using the Docker's bridge interface IP 172.17.0.1
in sgr mount
?
sgr --verbosity DEBUG mount mysql_fdw schema_wp_demo -c splitgraph:splitgraph@172.17.0.1:3306 -o@- <<EOF
{
"dbname": "splitgraph"
}
EOF
Is it ment to work with mysql only or MariaDB is accepted too ?
MariaDB should work as well, though we don't explicitly test it in our integration tests (just MySQL).
then I got this log
error: Traceback (most recent call last):
error: File "splitgraph/commandline/__init__.py", line 128, in invoke
error: File "click/core.py", line 1259, in invoke
error: File "click/core.py", line 1259, in invoke
error: File "click/core.py", line 1066, in invoke
error: File "click/core.py", line 610, in invoke
error: File "splitgraph/commandline/mount.py", line 69, in _callback
error: File "splitgraph/hooks/mount_handlers.py", line 66, in mount
error: File "splitgraph/hooks/data_source/fdw.py", line 163, in mount
error: File "splitgraph/hooks/data_source/fdw.py", line 179, in _create_foreign_tables
error: File "splitgraph/hooks/data_source/fdw.py", line 572, in import_foreign_schema
error: File "splitgraph/engine/postgres/psycopg.py", line 452, in run_sql
error: psycopg2.errors.FdwUnableToEstablishConnection: failed to connect to MySQL: Host '172.17.0.2' is not allowed to connect to this MariaDB server
error:
You might need to explicitly grant access in MariaDB to connect from this IP:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.17.0.2' -- or the user you're trying to connect as
Hey, thanks a lot, it work as expected :) have a nice week end
running
I get this
I tried different host : localhost, 127.0.0.1, 0.0.0.0 and I even open mysql access publicly, but nothing works.