Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not parse mysql DSN: no match found #19

Open
Bolderus opened this issue Aug 23, 2024 · 6 comments
Open

could not parse mysql DSN: no match found #19

Bolderus opened this issue Aug 23, 2024 · 6 comments

Comments

@Bolderus
Copy link

Bolderus commented Aug 23, 2024

on step 3 - Generate a pgloader configuration
but I am getting error "An Error Occurred: could not generate config: could not parse mysql DSN: no match found"

I am trying
./migration-assist pgloader --mysql="mmuser:mypassword@tcp(localhost:3306)/mattermost" --postgres="mmuser:mypassword@localhost:5432/mattermost"> migration.load

Also trying only
./migration-assist pgloader
Getting same error "An Error Occurred: could not generate config: could not parse mysql DSN: no match found"

Anybody can help me to solve problem ?

@Bolderus
Copy link
Author

any idea about error ? what I need to do solve problem ? What I am missing ?

@isacikgoz
Copy link
Member

Thanks for the feedback @Bolderus! Is there any semicolons etc on your actual mysql user? On the postgres DSN though, you should add postgres:// prefix to that.

@Bolderus
Copy link
Author

Dear @isacikgoz I dont have semicolons on my mysql user nor postgres user both is mmuser But mmusers passwords have plus sign "+" and "@" sign , my postgres and mysql user password is "4a5v6b7HH+@". As you can see below, I tried many methods but none of them worked. what can be the problem ?

./migration-assist pgloader --mysql="mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" --postgres="mmuser:4a5v6b7HH+@@localhost:5432/mattermost"> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader --mysql="<mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://"mmuser:4a5v6b7HH+@@localhost:5432/mattermost"> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader --mysql="mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://"mmuser:4a5v6b7HH+@@localhost:5432/mattermost"> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader --mysql="mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader --mysql=mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost> migration.load
-bash: syntax error near unexpected token `('

./migration-assist pgloader mysql="mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader mysql"mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader mysql "mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

./migration-assist pgloader mysql "mmuser:4a5v6b7HH+@@tcp(localhost:3306)/mattermost" postgres "postgres://mmuser:4a5v6b7HH+@@localhost:5432/mattermost"> migration.load
An Error Occurred: could not generate config: could not parse mysql DSN: no match found

@stafot
Copy link

stafot commented Aug 30, 2024

@isacikgoz most likely is parsing failure due to special character @

@Bolderus
Copy link
Author

Changing password solved and using password without "@" completed all steps . But when I checked "./pgloader calls.load > calls.log" There are alot of errors as you can see below. ERROR Database error 23505 How can I solve ?

WARNING Source column "mattermost"."ChannelMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."channelmembers"."schemeuser".
WARNING Source column "mattermost"."ChannelMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."channelmembers"."schemeadmin".
WARNING Source column "mattermost"."ChannelMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."channelmembers"."schemeguest".
WARNING Source column "mattermost"."Channels"."type" is casted to type "channel_type" which is not the same as "mattermost.channel_type", the type of current target database column "mattermost"."channels"."type".
WARNING Source column "mattermost"."OutgoingOAuthConnections"."oauthtokenurl" is casted to type "varchar" which is not the same as "text", the type of current target database column "mattermost"."outgoingoauthconnections"."oauthtokenurl".
WARNING Source column "mattermost"."OutgoingOAuthConnections"."granttype" is casted to type "varchar" which is not the same as "mattermost.outgoingoauthconnections_granttype", the type of current target database column "mattermost"."outgoingoauthconnections"."granttype".
WARNING Source column "mattermost"."RetentionIdsForDeletion"."ids" is casted to type "jsonb" which is not the same as "character varying[]", the type of current target database column "mattermost"."retentionidsfordeletion"."ids".
WARNING Source column "mattermost"."TeamMembers"."schemeuser" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."teammembers"."schemeuser".
WARNING Source column "mattermost"."TeamMembers"."schemeadmin" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."teammembers"."schemeadmin".
WARNING Source column "mattermost"."TeamMembers"."schemeguest" is casted to type "smallint" which is not the same as "boolean", the type of current target database column "mattermost"."teammembers"."schemeguest".
WARNING Source column "mattermost"."Teams"."type" is casted to type "team_type" which is not the same as "mattermost.team_type", the type of current target database column "mattermost"."teams"."type".
WARNING Source column "mattermost"."UploadSessions"."type" is casted to type "upload_session_type" which is not the same as "mattermost.upload_session_type", the type of current target database column "mattermost"."uploadsessions"."type".
WARNING PostgreSQL warning: constraint "fk_retentionpolicieschannels_retentionpolicies" of relation "retentionpolicieschannels" does not exist, skipping
WARNING PostgreSQL warning: constraint "fk_retentionpoliciesteams_retentionpolicies" of relation "retentionpoliciesteams" does not exist, skipping
ERROR Database error 23505: duplicate key value violates unique constraint "threadmemberships_pkey"
DETAIL: Key (postid, userid)=(1113y88wm3fdmmw1kxt9gr1z3y, 1o4c6cimsty89ycuoujipjjm9y) already exists.
CONTEXT: COPY threadmemberships, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "reactions_pkey"
DETAIL: Key (postid, userid, emojiname)=(111swrw61jyqzp96x7nutgho5e, 1aphrb167i8r3qa6w7ir673jhw, +1) already exists.
CONTEXT: COPY reactions, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "channelmemberhistory_pkey"
DETAIL: Key (channelid, userid, jointime)=(1111fjk9w78i8kggmt4tjhg11r, ero5b5m9otn4t8mbic9etncm8c, 1683087600044) already exists.
CONTEXT: COPY channelmemberhistory, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "pluginkeyvaluestore_pkey"
DETAIL: Key (pluginid, pkey)=(com.mattermost.apps, mmi_botid) already exists.
CONTEXT: COPY pluginkeyvaluestore, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "drafts_pkey"
DETAIL: Key (userid, channelid, rootid)=(1aphrb167i8r3qa6w7ir673jhw, j979xh5f1pftz8j7n6rd8o9z6a, qgq68ugj6tdguewigii1igxu3e) already exists.
CONTEXT: COPY drafts, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "teammembers_pkey"
DETAIL: Key (teamid, userid)=(1x7bdokmbpf5jrhxfrwzw95ooa, 41kdsohptib77n3tij8amh3mue) already exists.
CONTEXT: COPY teammembers, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "fileinfo_pkey"
DETAIL: Key (id)=(1x3yim76ebdsun7yq5oqhuc7fy) already exists.
CONTEXT: COPY fileinfo, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "audits_pkey"
DETAIL: Key (id)=(111kqhfrnt8gdjr7rqhzyh3why) already exists.
CONTEXT: COPY audits, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "jobs_pkey"
DETAIL: Key (id)=(1113e8guepg5uek7n47f4hedgh) already exists.
CONTEXT: COPY jobs, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "channelmembers_pkey"
DETAIL: Key (channelid, userid)=(1111fjk9w78i8kggmt4tjhg11r, ero5b5m9otn4t8mbic9etncm8c) already exists.
CONTEXT: COPY channelmembers, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "postspriority_pkey"
DETAIL: Key (postid)=(11cscw5dq7nfz86oj6u7guw14y) already exists.
CONTEXT: COPY postspriority, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "sidebarcategories_pkey"
DETAIL: Key (id)=(1ijsx95uoj8p3q3kep7nxh3j6r) already exists.
CONTEXT: COPY sidebarcategories, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "status_pkey"
DETAIL: Key (userid)=(1aphrb167i8r3qa6w7ir673jhw) already exists.
CONTEXT: COPY status, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "bots_pkey"
DETAIL: Key (userid)=(8bff8k1qr7b87msubggiuqxhne) already exists.
CONTEXT: COPY bots, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "preferences_pkey"
DETAIL: Key (userid, category, name)=(1aphrb167i8r3qa6w7ir673jhw, actions_menu, actions_menu_tutorial_state) already exists.
CONTEXT: COPY preferences, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "threads_pkey"
DETAIL: Key (postid)=(1113y88wm3fdmmw1kxt9gr1z3y) already exists.
CONTEXT: COPY threads, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "sessions_pkey"
DETAIL: Key (id)=(1e699b8i47gwtfuj3sifhwqpph) already exists.
CONTEXT: COPY sessions, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "sidebarchannels_pkey"
DETAIL: Key (channelid, userid, categoryid)=(1111fjk9w78i8kggmt4tjhg11r, ero5b5m9otn4t8mbic9etncm8c, 7u7yeijz4fnamewpy96po3orao) already exists.
CONTEXT: COPY sidebarchannels, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "publicchannels_pkey"
DETAIL: Key (id)=(15xfz3c69tddmmymb9wx4ksfcr) already exists.
CONTEXT: COPY publicchannels, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "channels_pkey"
DETAIL: Key (id)=(1111fjk9w78i8kggmt4tjhg11r) already exists.
CONTEXT: COPY channels, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "productnoticeviewstate_pkey"
DETAIL: Key (userid, noticeid)=(1aphrb167i8r3qa6w7ir673jhw, crt-admin-default_off) already exists.
CONTEXT: COPY productnoticeviewstate, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "recentsearches_pkey"
DETAIL: Key (userid, searchpointer)=(1aphrb167i8r3qa6w7ir673jhw, 0) already exists.
CONTEXT: COPY recentsearches, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "postreminders_pkey"
DETAIL: Key (postid, userid)=(59uax8g5efbemc8z1m89jr8wna, ero5b5m9otn4t8mbic9etncm8c) already exists.
CONTEXT: COPY postreminders, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "linkmetadata_pkey"
DETAIL: Key (hash)=(114770789) already exists.
CONTEXT: COPY linkmetadata, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "users_pkey"
DETAIL: Key (id)=(1aphrb167i8r3qa6w7ir673jhw) already exists.
CONTEXT: COPY users, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "incomingwebhooks_pkey"
DETAIL: Key (id)=(bepzrhds47dzxp3q87anqhmama) already exists.
CONTEXT: COPY incomingwebhooks, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "roles_pkey"
DETAIL: Key (id)=(18xcp4fpcpg4drwwirskcu33cw) already exists.
CONTEXT: COPY roles, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "teams_pkey"
DETAIL: Key (id)=(1x7bdokmbpf5jrhxfrwzw95ooa) already exists.
CONTEXT: COPY teams, line 1
ERROR Database error 23505: duplicate key value violates unique constraint "posts_pkey"
DETAIL: Key (id)=(11118p58dbn3ifsekfnz9k4zuy) already exists.
CONTEXT: COPY posts, line 1
ERROR PostgreSQL Database error 42501: must be owner of database mattermost
QUERY: ALTER DATABASE "mattermost" SET search_path TO mattermost;

@arminpkathrein
Copy link

Hi,

I've also the issue of "An Error Occurred: could not generate config: could not parse mysql DSN: no match found".
The only special character that I have in my password is the "_" sign.

Steps that I've done.

1. ./migration-assist mysql "doadmin:********@tcp(******.ondigitalocean.com:25060)/mattermost" (connected to mysql successfully).
2. ./migration-assist postgres "postgres://doadmin:*******@*****db.ondigitalocean.com:25060/mattermost" --run-migrations --mattermost-version="v10.0" --check-schema-owner=false (connected to postgres successfully).
3.  ./migration-assist pgloader --mysql="mysql://doadmin:*******@tcp(******db.ondigitalocean.com:25060)/mattermost" --postgres="postgres://doadmin:******@*****44714-0.k.db.ondigitalocean.com:25060/mattermost" > migration.load (connected to postgres successfully.)
4.  ./migration-assist pgloader migration.load > migration.log (An Error Occurred: could not generate config: could not parse mysql DSN: no match found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants