Bug #15203 mysql_install_db --> Error: fill_help_tables.sql (not found)...
Submitted: 23 Nov 2005 21:10 Modified: 28 Nov 2005 14:10
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.16 OS:IBM AIX (AIX 5.2)
Assigned to: CPU Architecture:Any

[23 Nov 2005 21:10] [ name withheld ]
Description:
Machine Model: RS/6000 44P Model 1170
AIX: Version 5.2, 64 bits kernel and JFS2 (filesystem)
Hardware: 1 GB RAM and 35 GB Hard Disk
MySQL: downloaded mysql-standard-5.0.16-aix5.2-powerpc-64bit zipped file

Error #1
--snip--
-=[/usr/local/mysql/scripts]==>./mysql_install_db 
./mysql_install_db[85]: my_print_defaults:  not found.
Could not find help file 'fill_help_tables.sql' in ./support-files or inside ..
-=[root@netgate]
-=[/usr/local/mysql/scripts]==>
--snip--

Here's the output via "sh -x ./myql_install_db".

--snip--
+ in_rpm=0
+ windows=0
+ defaults=
+ user=
+ test -x ./bin/my_print_defaults
+ test -x ./extra/my_print_defaults
+ test -x ./bin/my_print_defaults
+ test -x ./bin/mysql_print_defaults
+ print_defaults=my_print_defaults
+ args=
+ ldata=
+ execdir=
+ bindir=
+ basedir=
+ force=0
+ verbose=0
+ fill_help_tables=
+ my_print_defaults mysqld mysql_install_db
mysql_install_db[85]: my_print_defaults:  not found.
+ parse_arguments
+ parse_arguments PICK-ARGS-FROM-ARGV
+ test -z 
+ ldata=./data
+ test -z 
+ basedir=.
+ bindir=./bin
+ execdir=./bin
+ pkgdatadir=./support-files
+ pwd
+ pwd
+ test -f ./support-files/fill_help_tables.sql
+ test -f ./share/fill_help_tables.sql
+ test -f ./share/mysql/fill_help_tables.sql
+ test -f ./scripts/fill_help_tables.sql
+ test -f /usr/local/mysql/scripts/fill_help_tables.sql
+ test -f /usr/local/mysql/scripts/scripts/fill_help_tables.sql
+ test -f ./support-files/fill_help_tables.sql
+ test -f ./support-files/fill_help_tables.sql
+ echo Could not find help file 'fill_help_tables.sql' in ./support-files or inside ..
Could not find help file 'fill_help_tables.sql' in ./support-files or inside ..
+ exit 1
--snip--

How to repeat:
Download the MySQL 5.0.16 (64 bits) and install it on the AIX supported machine.  Then run the mysql_install_db in /usr/local/mysql/script directory.

Suggested fix:
Have the test database be installed successfully.
[25 Nov 2005 9:02] Joerg Bruehe
Usage error:
You have to be one level higher, and call
   scripts/mysql_install_db

I tried with the same package, and it worked for me.

(If tried as described, the effect is as described.)
[28 Nov 2005 14:10] [ name withheld ]
Well, it work now by going into the higher level.  I have no way of knowing that at first.  

You know, the script should work regardless of which directory anyone are in whether it is the "/", "/usr/local/mysq-blah blah blah", "/usr/local/mysql", "/usr/local/mysql/scripts", etc...   So, if it is in the best interest of some users as to avoid some inconviences for them, how about using the shell to check for the "pwd" (print working directory) and somehow work with the script.  Or something like that.  I'm sure somebody can come up with something simplier like that.  ;-)
[29 Nov 2005 18:39] Joerg Bruehe
Scott, thanks for the proposal. It is a valid one.

But that "install" script is written for several different situations, to which it tries to adapt.
Have you looked at its internals and seen the cascaded "if" searching for the other scripts to be called?
A check cannot be just for the one typical situation (customer install from a binary package) but must allow for the others as well. IMO, that is the reason it is not coded.

As you say "I have no way of knowing that at first": Is it really not specified in the manual?
If you want to pursue this, I propose you check that (your user view may differ from our internal one).
You might then file a "documentation" bug (or improvement proposal) stating this, referring to this bug.
[21 Oct 2008 0:51] Harold Valdivia
try:
mysql_install_db --user=mysql --no-defaults