Bug #74973 make mysql_install_db in 5.7.5 to use CWD when --basedir is not specified
Submitted: 24 Nov 2014 8:09 Modified: 26 Mar 2015 13:18
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Installing Severity:S4 (Feature request)
Version:5.7.5-m15, 5.7.5-labs OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2014 8:09] Tsubasa Tanaka
Description:
This is feature request.

Previous versions of mysql_install_db, 5.6 and 5.5 and earlier, uses current working directory when --basedir is not specified.

5.7's mysql_install_db does not, but that was useful.

How to repeat:
in 5.7.5,

$ cd /usr/local/mysql
$ bin/mysql_install_db --no-defaults --datadir=./data
2014-11-24 17:06:27 [ERROR]   Can't locate the language directory.

in 5.6.21,

$ cd /usr/local/mysql
$ scripts/mysql_install_db --no-defaults --datadir=./data

Suggested fix:
See attached patch.
[24 Nov 2014 8:10] Tsubasa Tanaka
Patch based 5.7.5-labs

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug74973.patch (application/octet-stream, text), 340 bytes.

[24 Nov 2014 8:36] Tsubasa Tanaka
Based on 5.7.5-labs

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug74973_2.patch (application/octet-stream, text), 1.18 KiB.

[24 Nov 2014 8:36] Tsubasa Tanaka
I could make it more simply.
[24 Nov 2014 12:12] MySQL Verification Team
Hello Tsubasa-San,

Thank you for the report and contribution.

Thanks,
Umesh
[24 Nov 2014 12:14] MySQL Verification Team
Also, see http://bugs.mysql.com/73845
[26 Mar 2015 13:18] Erlend Dahl
WL#7307 folds database initialization in server binary. It is now possible to
initialize server with --initialize option.

mysql_install_db is now deprecated and hence no new enhancement will be
added.