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

Is is possible to set using password: NO when using MySQL? #203

Closed
zshipko opened this issue Mar 30, 2020 · 3 comments
Closed

Is is possible to set using password: NO when using MySQL? #203

zshipko opened this issue Mar 30, 2020 · 3 comments
Labels
bug db:mysql Related to MySQL

Comments

@zshipko
Copy link

zshipko commented Mar 30, 2020

I am using sqlx to connect to MySQL for a user that has no password configured. Is there any way to connect with an empty password and using password: NO activated?

Thanks!

@zshipko zshipko changed the title Is there any way to set using password: NO for MySQL? Is is possible to set using password: NO when using MySQL? Mar 30, 2020
@mehcode
Copy link
Member

mehcode commented Mar 31, 2020

@zshipko Marked the issue wrong in that commit but this is fixed in d820763

Thanks for the bug report.

@mehcode mehcode added bug db:mysql Related to MySQL labels Mar 31, 2020
@zshipko
Copy link
Author

zshipko commented Mar 31, 2020

Awesome, thank you! I appreciate the quick response :-)

@distinctjuggle
Copy link

Am I doing something wrong, or is this broken again somehow?

I've tried quite a few different combinations and none seem to be handled properly.

They either are sending some password which is incorrect, or they are failing to properly read and handle the username:

let database_url = "mysql://username@localhost/database?user=username";
let database_url = "mysql://username:@localhost/database?user=username";
let database_url = "mysql://username:@localhost/database?password=";
let database_url = "mysql://username:''@localhost/database?password=";
let database_url = "mysql://'username':@localhost/database?password="

I've probably tried a few others as well, but I can't seem to get it to pass it over properly. I'll always end up with either the, "wrong" password (read: a password which isn't blank), or the username not being recognized and thus resulting in an error like: "Access denied for user ''@'localhost' to database xxx

Is there something else I can try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug db:mysql Related to MySQL
Projects
None yet
Development

No branches or pull requests

3 participants