Bug #79130 | mysqldbimport fails to import GRANTs for not existent users | ||
---|---|---|---|
Submitted: | 4 Nov 2015 22:53 | Modified: | 30 Aug 2016 13:37 |
Reporter: | Sveta Smirnova (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Utilities | Severity: | S3 (Non-critical) |
Version: | 1.6.2 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Nov 2015 22:53]
Sveta Smirnova
[4 Nov 2015 23:13]
Sveta Smirnova
This is 5.7 compatibility issue, can be any user, not existed on the destination server.
[5 Nov 2015 6:37]
MySQL Verification Team
Hello Sveta, Thank you for the report. Thanks, Umesh
[22 Dec 2015 12:00]
Roberto Polli
I kludged removing 'no_create_user' from sql_mode during the import. Will it work in your case?
[22 Dec 2015 12:22]
Sveta Smirnova
Roberto, well, it should help in my case too. But since this is default SQL mode in 5.7 mysqldbimport should be aware of it.
[4 Jan 2016 14:27]
Roberto Polli
Sveta, how are you addressing this issue now? Are you adding the CREATE USER in the .sql or kludging? - adding set sql_mode in the resulting .sql? Do you think implementing something like mysql --init-command is fine? You may be interested in this (patch) too http://bugs.mysql.com/bug.php?id=79711
[26 Jul 2016 23:53]
Chuck Bell
Hi Sveta, I've located the issue in the code, but there is a complication. Are you expecting the import to set passwords for the missing user accounts? If so, we will have to add that feature to mysqldbexport because it currently does not export user accounts - only the GRANTS (which is a problem for 5.7 servers).
[27 Jul 2016 13:12]
Sveta Smirnova
Hi Chuck, good question. To be compatible with 5.6 you need to just create password-less users, probably with option EXPIRE PASSWORD. Copying existent passwords can be convenient too, but requires an option, so user can choose if s/he wants to copy passwords or just allow password-less logins for the first time.