You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string in .env: DATABASE_URL=mysql://root:Q3Mjg=@127.0.0.1/templatedb
Parsed URL: mysql://root:Q3Mjg%3D@127.0.0.1/templatedb
password: Q3Mjg%3D
Error: error returned from database: 1045 (28000): Access denied for user 'root'@'172.17.0.1' (using password: YES)
Some other attributes of the URL are also like it, may have to watch for them, but the password easiest to have special characters.
Thanks.
The text was updated successfully, but these errors were encountered:
biluohc
changed the title
Bugs about URL with percent-encoded ASCII string
Bugs about URL and percent-encoded ASCII string
Aug 1, 2020
Sqlx's Version: 0.4.0-beta.1 and master.
Sqlx can't connect to DATABASE if the URL's password contains special characters that needs url-encoding now.
Maybe should use
percent_encoding
to decode it.I use MySQL, buts other databases also have this problem.
https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/mysql/options/parse.rs#L26
pub fn query(&self) -> Option<&str>
Return the password for this URL, if any, as a percent-encoded ASCII string.
Some other attributes of the URL are also like it, may have to watch for them, but the password easiest to have special characters.
Thanks.
The text was updated successfully, but these errors were encountered: