Bug #5823 mysql_install_db fails due to incorrect max_allowed_packet
Submitted: 30 Sep 2004 11:44 Modified: 6 Dec 2004 15:16
Reporter: Yashesh Bhatia Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.1.5-gamma OS:Linux (Red Hat 8.0)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[30 Sep 2004 11:44] Yashesh Bhatia
Description:
While following installation instructions for an install from source i get an error.
The installation steps in the documentation are

---------------------------------------------------------------------------------------------------------
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
---------------------------------------------------------------------------------------------------------

when i run the command
shell> bin/mysql_install_db --user=mysql

i get the error

---------------------------------------------------------------------------------------------------------
[root@bfc1 mysql]# bin/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables
ERROR: 1153  Got a packet bigger than 'max_allowed_packet' bytes
040930 17:05:41  [ERROR] Aborting

040930 17:05:41  [NOTE] /usr/local/mysql/libexec/mysqld: Shutdown complete

WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!
The "HELP" command might not work properly

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h bfc1 password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
[root@bfc1 mysql]#
---------------------------------------------------------------------------------------------------------

Looks like an installation documentation bug.

How to repeat:
1 - Download the source tarball file from mysql website - mysql-4.1.5-gamma.tar.gz
2 - Untar the file.
3 - cd mysql-4.1.5-gamma/
3 - Read the README file.
4 - Follow instructions in the file "Docs/manual.txt" for installing mysql.
[25 Oct 2004 15:26] Hartmut Holzgraefe
mysql_install_db uses --bootstrap which reads commands from stdin instead of listening on sockets. Here it seems to read into the net_buffer right away and doesn't dynamicly resice it up to max_allowed_packet. The default value of 16KB is big enough for mysql_install_db but the my-xxx.cnf sample files set net_buffer_size to 8KB instead which is too small here.

mysql_install_db should add the --net_buffer_size=16K option instead of (or alongside with) --max_allowed_packet=8M when calling mysqld in --bootstrap mode.

As a workaround you can change 

  net_buffer_size=8K

to 

  net_buffer_size=16K

in your /etc.my.cnf to make mysql_install_db work
[25 Oct 2004 18:21] Hartmut Holzgraefe
the parameter name is actually net_buffer_length, not net_buffer_size
[6 Dec 2004 15:16] Ramil Kalimullin
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:

fixed in 4.1.8