Bug #21905 mysql_install_db fails on Debian
Submitted: 29 Aug 2006 15:44 Modified: 5 Apr 2007 9:44
Reporter: Giuseppe Maxia Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.24 OS:Linux (Linux Debian 3.1)
Assigned to: Assigned Account CPU Architecture:Any

[29 Aug 2006 15:44] Giuseppe Maxia
Description:
On a Linux Debian installation, the mysql_install_db program fails with error 11.

I used a binary distribution (mysql-max-5.0.24-linux-i686.tar.gz) and a freshly installed Debian 3.1, with standard install from the first CD and no additional packages.
Notice that THERE ARE NO PREVIOUS MySQL installations in this box, not even client libraries.

This is the backtrace:
0x8196ac2
0x4003c825
0x82eca4c
0x82e2569
0x40a4f996
0x40a4fb0b
0x40a4f1bf
0x40a4f470
0x401f35eb
0x401f3496
0x8195f28
0x8196203
0x8198457
0x4011ce36
0x813e001

and the stack trace
0x8196ac2 handle_segfault + 430
0x4003c825 _end + 931911805
0x82eca4c __db_associatechk + 16
0x82e2569 __db_associate + 161
0x40a4f996 _end + 942475758
0x40a4fb0b _end + 942476131
0x40a4f1bf _end + 942473751
0x40a4f470 _end + 942474440
0x401f35eb _end + 933709379
0x401f3496 _end + 933709038
0x8195f28 set_ports__Fv + 52
0x8196203 network_init__Fv + 27
0x8198457 main + 431
0x4011ce36 _end + 932830862
0x813e001 _start + 33

I noticed the same error on different servers running Debian. The same error happens when installing binary packages of MySQL from 4.0 to 5.1.

To isolate the problem, I installed a new Debian in a virtual machine and I installed fromscratch. The result is what you see here.

How to repeat:
1) use a Linux/Debian 3.1 operating system
2) create a directory
3) unpack the binary package of MySQL 5.0.24
4) change dir to the base directory you have just unpacked
5) run the script
$ scripts/mysql_install_db --no-defaults --user=$USER --basedir=`pwd` \ 
   --datadir=`pwd`/data

Suggested fix:
The only thing I can do at the moment is to copy the grant files from another OS.
[30 Aug 2006 8:33] Sveta Smirnova
Thank you for the report.

Verified as described using package named by reporter.
[16 Jan 2007 11:42] Kristian Nielsen
This is almost certainly yet another duplicate of BUG#11047.

mysqld is linked statically with our own version of BDB.

This causes a conflict when we link dynamically with another library (such as libc...) which is using a non-compatible version of BDB.

In this case, /etc/nsswitch.conf by default on debian uses BDB for lookups.

It seems that we are bound to run into this again and again until we drop BDB from our binaries. Maybe this problem alone would be sufficient reason to omit
BDB from future official 5.0 binaries?