[MDEV-8534] [PATCH] mysql_secure_installation doesn't pass "socket" to "mysql" Created: 2015-07-23 Updated: 2015-07-27 Resolved: 2015-07-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.0.20 |
| Fix Version/s: | 10.0.21 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
mysql_secure_installation doesn't pass "socket" to the "mysql" client. It doesn't matter if the argument is set in the configuration file provided as --defaults-file or if it is set with --socket via the command-line. e.g., Let's start with some setup with a binary tarball installation:
Contents of /etc/my.cnf:
Contents of /home/ec2-user/mariadb-10.0.20-linux-x86_64/my.cnf:
Now, try to call mysql_secure_installation. It should use the "socket" value in the file provided by --defaults-file.
So, let's try setting it with --socket instead:
|
| Comments |
| Comment by Geoff Montee (Inactive) [ 2015-07-24 ] |
|
The fix for "--socket" appears to be easy. I submitted a pull request for that here: https://github.com/MariaDB/server/pull/88 I have not tried to fix the problem with --defaults-file yet. |
| Comment by Geoff Montee (Inactive) [ 2015-07-24 ] |
|
The pull request now also has a commit that passes "--defaults-file", "--defaults-extra-file", and "--no-defaults" to the mysql client. |
| Comment by Sergei Golubchik [ 2015-07-25 ] |
|
GeoffMontee, thanks for the fix. Unfortunately, it was for 10.1, so I couldn't merge it into 10.0. I've applied it as a patch. And your patch didn't pass defaults-file to parse_arguments as the old code did. I've fixed that. Pushed into bb-10.0-serg, please check if mysql_secure_installation is ok now. |
| Comment by Geoff Montee (Inactive) [ 2015-07-25 ] |
|
Hi serg,
Sorry about that. If I submit a fix in the future that should apply to both 10.0 and 10.1, should I submit pull requests for both branches, or should I submit a pull request for just 10.0, and it will get merged into 10.1 later?
My code did pass defaults-file to parse_arg, but it did it inside parse_arguments instead of inside make_config. The way you did it makes more sense to me though, since now parse_arguments treats all of the defaults variables in a similar way.
I just tested it out, and it worked for me. Thanks for reviewing and committing the patch! |
| Comment by Sergei Golubchik [ 2015-07-25 ] |
|
GeoffMontee, correct, if you have a fix for 10.0 and 10.1 — only create a pull request for 10.0. If you have a fix for 5.5, 10.0, and 10.1 — only create a patch for 5.5. That is, always in the lowest version, then it'll be merged upwards. It only makes sense to create pull requests for both 10.0 and 10.1 if these two patches are significantly different. Thanks! I'm closing the bug now. |