[MDEV-14580] mysql_install_db "Could not find ./bin/my_print_defaults" Created: 2017-12-05 Updated: 2019-01-21 Resolved: 2019-01-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.3.3 |
| Fix Version/s: | 10.1.38, 5.5.63, 10.0.38, 10.2.22, 10.3.13 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Daniel Black | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | contribution, foundation | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.1.32 | ||||||||
| Description |
|
a default compiled mariadb (CMAKE_INSTALL_PREFIX:PATH=/usr/local/mysql) installed, with make install. path set:
A work around is to include `--basedir=/usr/local/mysql` in the mysql_install_db options however this should be default on an install. Recently changed in all versions (though problem probably existed before hand). |
| Comments |
| Comment by Sergei Golubchik [ 2018-04-04 ] | |||||||||||||||||||||||||||
|
I think it could've been fixed simpler, by not resetting $basedir:
But should it default to /usr/loca//mysql? tarball is supposed to be fully relocatable, it can be unpacked anywhere. I don't know if it's safe to assume that it'll be unpacked into /usr/local/mysql. | |||||||||||||||||||||||||||
| Comment by Daniel Black [ 2018-04-04 ] | |||||||||||||||||||||||||||
|
How about something like the following so we fall back to path if not found. At least the user can fix that without editing the instlaled file.
| |||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2018-04-11 ] | |||||||||||||||||||||||||||
|
My point is, if there's one mariadb tarball installed in /usr/local, and another one in, say, ~/mariadb-test or, for example, /usr/local/mariadb-10.3, then a user would rather prefer an error if --basedir is not specified, rarher then picking up incorrect mariadb installation automatically. After all, mysql_install_db is run only once. On the other hand, using the dirname $0 as a hint to guess the correct path seems pretty safe. Just need to be portable enough. | |||||||||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2019-01-03 ] | |||||||||||||||||||||||||||
|
danblack There were some comments from Serg. Is there something that you could change accordingly in the patch? | |||||||||||||||||||||||||||
| Comment by Daniel Black [ 2019-01-12 ] | |||||||||||||||||||||||||||
|
Updated PR created based purely on dirname. I haven't found any suggestion is anything other than posix. Related, fixes user problem, https://github.com/MariaDB/server/pull/760#issuecomment-452903667, and hopefully eliminates the need for https://git.alpinelinux.org/aports/tree/main/mariadb/fix-mysql-install-db-path.patch in alpine. |