Reputation: 1
Ive installed docker and pgloader on my windows for migration Ive exported an sql dump file of my mysql db using phpMyAdmin
Ive tried two ways to migrate all coming up with fails
C:\Users\test\Downloads>docker run --rm -it -v C:/Users/test/Downloads:/dump dimitri/pgloader:latest pgloader --type mysql --with "mysql-compatible" /dump/localhost.sql postgresql://postgres:[email protected]:5433/new-db
2024-05-08T07:22:13.049991Z LOG pgloader version "3.6.7~devel"
2024-05-08T07:22:13.059989Z FATAL Failed to parse "/dump/localhost.sql" as a source URI.
2024-05-08T07:22:13.069987Z LOG You might need to use --type.
2024-05-08T07:22:13.069987Z ERROR Could not parse --with ("mysql-compatible"):
2024-05-08T07:22:13.069987Z ERROR NIL fell through ECASE expression.
Wanted one of (:CSV :FIXED :COPY :DBF :IXF :SQLITE :PGSQL :MYSQL :MSSQL).
Could not parse the command line: see above.
C:\Users\test>docker run --rm -it dimitri/pgloader:latest pgloader --type=mysql mysql://root:password\@new:3306/db_multitouch postgresql://postgres:[email protected]:5433/new-db
2024-05-08T05:59:39.069998Z LOG pgloader version "3.6.7~devel"
2024-05-08T05:59:39.389982Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@newdb:3306/db_multitouch {1007327573}>
2024-05-08T05:59:39.389982Z LOG Migrating into #<PGSQL-CONNECTION pgsql://[email protected]:5433/new-db {100747C053}>
2024-05-08T05:59:42.749790Z ERROR mysql: Failed to connect to mysql at "newdb" (port 3306) as user "root": Condition USOCKET:NS-HOST-NOT-FOUND-ERROR was signalled.
2024-05-08T05:59:42.749790Z LOG report summary reset
table name errors rows bytes total time
----------------- --------- --------- --------- --------------
fetch meta data 0 0 0.000s
----------------- --------- --------- --------- --------------
----------------- --------- --------- --------- --------------
my postgres version 16.2 on a windows 10
my mysql server version Server version: 8.0.37 - MySQL Community Server - GPL Protocol version: 10 Server charset: UTF-8 Unicode (utf8mb4)
how do i solve this preferably using the dump file alone without need to connect to the hosted database
I've tried adding rules to firewall as well as checking user privileges for users on both mysql and posgres along with verified user credentials
Upvotes: 0
Views: 405