Bug #42381 Documentation for mysql_install_db could use clarification / extension
Submitted: 27 Jan 2009 16:54 Modified: 5 Mar 2009 18:24
Reporter: Patrick Crews Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0+ OS:Solaris
Assigned to: Paul DuBois CPU Architecture:Any
Tags: documentation, installation, mysql_install_db, setup

[27 Jan 2009 16:54] Patrick Crews
Description:
The documentation for using mysql_install_db should have some extra options added to it
http://dev.mysql.com/doc/refman/5.1/en/unix-post-installation.html

In the url above, it recommends invoking mysql_install_db as follows:
shell> bin/mysql_install_db --user=mysql
shell> scripts/mysql_install_db --user=mysql

However, on certain systems, the script also need --datadir and --basedir options to perform it's job properly.  (Tested on OpenSolaris 2008.05 via .pkg installation)

How to repeat:
Install a MySQL package on Sun Solaris (errors seen on OpenSolaris 2008.05).

Run scripts/mysql_install_db from the MySQL directory (/opt/mysql/mysql) as noted in the manual:
scripts/mysql_install_db --user=mysql

Observer that the mysql.* tables are not created.

Run scripts/mysql_install_db --datadir=/opt/mysql/mysql/data --basedir=/opt/mysql/mysql and observe that the mysql.* tables (grant, help, etc) are created.

Suggested fix:
Update the documentation to recommend using these options.

Running a search for 'mysql.host doesn't exist' will show many people are running into errors from not using these parameters.

It seems there is a fair amount of frustration about this and some extra documentation might help.
[27 Feb 2009 9:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/67808

3090 Patrick Crews	2009-02-27
      Bug#42381
      
      Re-enabling these tests
      ctype_create is going to be watched for ~1 week of pushed before closing the bug out
      csv_alter_table should have been enabled as the original bug has been corrected.
[5 Mar 2009 18:24] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.