[MDEV-8498] mysql_secure_installation can't find "mysql" in basedir Created: 2015-07-17 Updated: 2015-10-26 Resolved: 2015-10-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.0.20, 10.1.5 |
| Fix Version/s: | 10.0.22, 10.1.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 10.0.22 |
| Description |
|
If the "mysql" client is not found in $PATH, then mysql_secure_installation won't find it from in basedir:
But it will find it if added to $PATH:
I think the bug happens because bindir is set to use basedir here: https://github.com/MariaDB/server/blob/d258f5ff0435cbd8b000226dc7dc3ec4e9b79cbc/scripts/mysql_secure_installation.sh#L176 But then find_in_basedir is called here: https://github.com/MariaDB/server/blob/d258f5ff0435cbd8b000226dc7dc3ec4e9b79cbc/scripts/mysql_secure_installation.sh#L184 Which adds basedir to the path again here: https://github.com/MariaDB/server/blob/d258f5ff0435cbd8b000226dc7dc3ec4e9b79cbc/scripts/mysql_secure_installation.sh#L83 So if basedir is /usr/local/mysql, it will search for /usr/local/mysql/usr/local/mysql/bin/mysql. |
| Comments |
| Comment by Sergey Vojtovich [ 2015-10-23 ] |
|
serg, please review fix for this bug. |
| Comment by Sergei Golubchik [ 2015-10-23 ] |
|
ok to push |