Bug #2277 Problems running mysql_install_db (MySQL-4.0.17) Mac OS X 10.3.2 Panther
Submitted: 4 Jan 2004 19:35 Modified: 30 Jan 2004 10:24
Reporter: Daniel Bermudez Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.17 OS:MacOS (Mac OS X 10.3.2 Panther)
Assigned to: Michael Widenius CPU Architecture:Any

[4 Jan 2004 19:35] Daniel Bermudez
Description:
Compiled, ran make and make install successfully!
Running mysql_install_db fails with error 22 when trying to lock mutex in file log.cc.  Verbose 
follows:

Ryoko:/Users/dbermude/Desktop/mysql-4.0.17 root# /usr/local/mysql/bin/
mysql_install_db --force --log
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
Got error 22 when trying to lock mutex at log.cc, line 1689
/usr/local/mysql/bin/mysql_install_db: line 1:  7030 Abort trap              /usr/local/mysql/libexec/
mysqld --bootstrap --skip-grant-tables --basedir=/usr/local/mysql --datadir=/usr/local/mysql/
var --skip-innodb --skip-bdb --log
Installation of grant tables failed!

Examine the logs in /usr/local/mysql/var for more information.

How to repeat:
Get lastest developer's SDK for Panther before starting.

1- Download 4.0.17 with curl.
2- run configuration as;
     ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/usr/local/mysql/run/  
mysql_socket --with-mysqld-user=mysql --with-comment --with-debug
3- Do 'make'.
4- Do 'make install'
5- Run '/usr/local/mysql/bin/mysql_install_db --force'

Suggested fix:
I wish I knew....
[5 Jan 2004 2:33] Guilhem Bichot
Hi,
There are suspicions of a problem (related to the SIGHUP signal,
http://bugs.mysql.com/2030 ) with MySQL & Panther. So could you please run
/usr/local/mysql/bin/mysql_install_db --force --log --debug 
this will create a debug trace, usually stored in a file named /tmp/mysqld.trace (but I don't know what the temporary directory is on your system).
This should still crash. Then, could you please upload the error log (/usr/local/mysql/var/*.err probably) and the debug file (please make a compressed archive of both files) at
 ftp://support.mysql.com/pub/mysql/secret/
and let us know the name of the file you uploaded, so that we can examine it.
Thank you in advance!
Guilhem
[30 Jan 2004 10:24] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The problem with mysql_install_db is related to the lower-case-table-name fix we did in 4.0.17.  This will be fixed in the 4.0.18 binary.