-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unexpected behaviour: granting privileges to the runtime user as opposed to the supplied MySQL user #26
Comments
The intended behaviour is:
Here's how I ran it:
This logged in as I added some additional context to the command help last night, e.g. Suggestions? |
Interesting! When I run Looks like the step where it creates the |
That's great feedback - likely I created the user manually at some point and forgot to script it! I'll look into this ^^ |
I created the xander manually MySQL before I started. It used the existing xander user to create the database. I didn't get the error Lucas is getting so I think your assessment of the bug is correct, Jason. |
Looking at the script, I think that’s right. The only mention of the |
Command ran:
tribble --user MYSQL_USER --password MYSQL_USER_PASSWORD create_db
(subbingMYSQL_USER
andMYSQL_USER_PASSWORD
for actual values).Expected behaviour: database would be created.
Actual behaviour: SQLAlchemy error
1133, "Can't find any matching row in the user table") [SQL: 'GRANT ALL PRIVILEGES ON spending.* to lucas@localhost;'
It looks like the
create_db
command grants privileges for the created table to the runtime user as opposed to the user provided by the--user
flag (relevant line of code). I’d expect it to use the value of the--user
flag as opposed to the runtime user. (On my machine, I’m using theroot
MySQL user as opposed to one named with my user account, so I’d expect it to grant privileges for thespending
table to theroot
user that I pass in, rather than my runtime username.)If this is expected behaviour, to be granting permissions to the runtime username instead of the MySQL username, we should document that. Otherwise, we should modify the behaviour. I also don’t altogether understand the distinction between the user provided in
--user
and the one provided in--runtime-user
; clarifying that could clear this up.The text was updated successfully, but these errors were encountered: