Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Issue on mysql charm user permission #4
Comments
|
@prabucjs I suggest that you make the changes you would like to see in the code and propose that as a pull request to the relation code, so we can review this change. |
marcoceppi
closed this
in
bd7565c
Sep 30, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
prabucjs commentedJul 15, 2016
Hi Marco,
My sample charm uses mysql-root interface for executing mysql queries in the remote machine. Using mysql-root interface I was able to create a database for my product but i am not able to give GRANT access to it. But there was a failure on the last "GRANT ALL" statement. Log link is for your perusal is http://pastebin.ubuntu.com/19522391/
I explored and found the actual cause of this issue. It is because of the user which was created by the mysql charm. If you modify the sql query which is used to create a mysql user at the mysql charm side as mentioned below
1, CREATE USER ''@'localhost' IDENTIFIED BY 'some_pass';
2, GRANT ALL PRIVILEGES ON . TO '< Mysql user name>'@'localhost' WITH GRANT OPTION;
Here the second query which I have mentioned above uses WITH GRANT OPTION will grants the permission. If Mysql charm give a user created for us using the above query, we can use this via mysql-root interface and it will not cause any error while running GRANT command.
Kindly check and adivise if i could get the user from mysql-root interface WITH GRANT OPTION;
Thanks