remorses / planetscale-to-supabase

Script to migrate Mysql data and schema to Supabase
67 stars 4 forks source link

Issue connecting to mysql from npx migrate-planetscale-to-supabase #3

Open asim-shrestha opened 4 months ago

asim-shrestha commented 4 months ago

Seems to do with the fact that

        command: mysqld --default-authentication-plugin=mysql_native_password

In the docker compose config didn't work. (MySQL throws an Invalid attribute error)

Eventually I tried to add a my.cnf to ensure this auth plugin is used:

// my.cnf
[mysqld]
mysql_native_password=ON
plugin-load-add=mysql_native_password.so
bind-address=0.0.0.0
authentication-policy=mysql_native_password

But regardless I get the following issue running the command:

2024-05-16T19:17:17.148000Z LOG Data errors in '/tmp/pgloader/'
2024-05-16T19:17:17.149000Z LOG Parsing commands from file #P"/tmp/pgloader/pgloader-config.load"
2024-05-16T19:17:18.633000Z LOG Migrating from #<MYSQL-CONNECTION mysql://user@host.docker.internal:3306/db {1006B0F2D3}>
2024-05-16T19:17:18.635000Z LOG Migrating into #<PGSQL-CONNECTION {REDACTED} {1006B0F683}>
2024-05-16T19:17:18.789000Z ERROR mysql: Failed to connect to mysql at "host.docker.internal" (port 3306) as user "user": Condition QMYND:MYSQL-UNSUPPORTED-AUTHENTICATION was signalled.
asim-shrestha commented 4 months ago

I downgraded the mysql version (arbitrarily to image: mysql:8.0-oraclelinux8 . So my sql 8003 from 804 or something according to errors) and it ended up progressing to actually start the migration, but i'm now getting

fatal error encountered in SBCL pid 1 tid 13:
maximum interrupt nesting depth (8) exceeded

Error opening /dev/tty: No such device or address