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

If the password contains special characters, the atlas execution fails #1985

Closed
QuanZi123 opened this issue Aug 15, 2023 · 3 comments
Closed

Comments

@QuanZi123
Copy link

When I used atlas, I failed to export the data structure when the password contained @ or #

Executed command:
atlas schema inspect -u "mysql://root:aG2^eM5#qD@localhost:3306/atlas_test" --format "{{ json . }}" > d:\atlasgo\ttt\result.json

@giautm
Copy link
Member

giautm commented Aug 15, 2023

Hello @QuanZi123, you need to encode user/password with the function encodeURLComponent from the browser as described in URI spec. Or access this link

The result will look like this: encodeURIComponent('aG2^eM5#qD') -> aG2%5EeM5%23qD

@a8m
Copy link
Member

a8m commented Aug 15, 2023

Hey @QuanZi123 👋🏻

Please, follow the steps Giau mentioned. Adding here a link to @rotemtam’s comment for more context: #1034 (comment):

As the command accepts a URL, the standard way for dealing with odd characters is using URL encoding, see IETF RFC 1738, (see section 2.2) which defines URLs formally. I don't think Atlas should encode the URL for the user as this is a one-time operation (e.g doesn't change unless the password itself changes).

@QuanZi123
Copy link
Author

Thanks

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

3 participants