Bug #24782 settings in my.cnf prevent proper installation using mysql_install_db
Submitted: 3 Dec 2006 22:37 Modified: 4 Dec 2006 8:15
Reporter: Roland Bouman Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.14bk OS:Linux (ubuntu edgy)
Assigned to: CPU Architecture:Any
Tags: install, my.cnf, mysql_install_db, proc table

[3 Dec 2006 22:37] Roland Bouman
Description:
I compile using these lines:

cd mysql-5.1

sudo BUILD/compile-pentium-max \
--prefix=/opt/mysql/mysql-5.1.14 \

sudo make install

After that, I run mysql_install_db

However,  that does not work for me. On the first run, it installs the var, var/mysql and var/test directories but only a few of the tables in the mysqldb.

On the second run, it installs more tables, but I can never get it to create the proc table (and the general and slow_query log tables                                       due to the fact that these are created with a procedure)

I have noticed that these problems do not occur when I rename my /etc/my.cnf file to something else.                                                                             

The script only shows some warnings, none of which mention the proc table. MySQL can be started, but you can't create procedures (for obvious reasons)

How to repeat:
place the attached my.cnf in /etc and run mysql_install_db the first time (make sure to rename your current var directory if this is an already installed db):

------------------>
roland@Rolenove:/opt/mysql/mysql-5.1.14$ bin/mysql_install_db
Installing all prepared tables
061203 23:28:04 [Warning] Although a path was specified for the --log option, log tables are used. To enable logging to file use the --log-output option.
061203 23:28:04 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to file use the --log-output option.
Fill help tables
061203 23:28:04 [Warning] Although a path was specified for the --log option, log tables are used. To enable logging to file use the --log-output option.
061203 23:28:04 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to file use the --log-output option.

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:
/opt/mysql/mysql-5.1.14/bin/mysqladmin -u root password 'new-password'
/opt/mysql/mysql-5.1.14/bin/mysqladmin -u root -h Rolenove password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /opt/mysql/mysql-5.1.14 ; /opt/mysql/mysql-5.1.14/bin/mysqld_safe &

Please report any problems with the /opt/mysql/mysql-5.1.14/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 http://shop.mysql.com
<-------------------------------------------

Now, look in the var/mysql dir:

roland@Rolenove:/opt/mysql/mysql-5.1.14$ ls var/mysql
db.frm  db.MYD  db.MYI  host.frm  host.MYD  host.MYI  user.frm  user.MYD  user.MYI

Run mysql_install_db again:

----------------------------------->
roland@Rolenove:/opt/mysql/mysql-5.1.14$ bin/mysql_install_db
Installing all prepared tables
Roland here
/opt/mysql/mysql-5.1.14/libexec/mysqld --bootstrap --skip-grant-tables --basedir=/opt/mysql/mysql-5.1.14 --datadir=/opt/mysql/mysql-5.1.14/var --skip-innodb --skip-ndbcluster --max_allowed_packet=8M --net_buffer_length=16K
Bye
061203 23:32:04 [Warning] Although a path was specified for the --log option, log tables are used. To enable logging to file use the --log-output option.
061203 23:32:04 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to file use the --log-output option.
Fill help tables
061203 23:32:04 [Warning] Although a path was specified for the --log option, log tables are used. To enable logging to file use the --log-output option.
061203 23:32:04 [Warning] Although a path was specified for the --log-slow-queries option, log tables are used. To enable logging to file use the --log-output option.

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:
/opt/mysql/mysql-5.1.14/bin/mysqladmin -u root password 'new-password'
/opt/mysql/mysql-5.1.14/bin/mysqladmin -u root -h Rolenove password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /opt/mysql/mysql-5.1.14/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 /opt/mysql/mysql-5.1.14 ; /opt/mysql/mysql-5.1.14/bin/mysqld_safe &

Please report any problems with the /opt/mysql/mysql-5.1.14/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 http://shop.mysql.com
---------------------------------------------------------->

Look inside the var/mysql directry again:

roland@Rolenove:/opt/mysql/mysql-5.1.14$ ls var/mysql
columns_priv.frm  func.MYD           help_relation.MYI     plugin.frm       time_zone_leap_second.frm  time_zone_transition.MYI
columns_priv.MYD  func.MYI           help_topic.frm        plugin.MYD       time_zone_leap_second.MYD  time_zone_transition_type.frm
columns_priv.MYI  help_category.frm  help_topic.MYD        plugin.MYI       time_zone_leap_second.MYI  time_zone_transition_type.MYD
db.frm            help_category.MYD  help_topic.MYI        procs_priv.frm   time_zone.MYD              time_zone_transition_type.MYI
db.MYD            help_category.MYI  host.frm              procs_priv.MYD   time_zone.MYI              user.frm
db.MYI            help_keyword.frm   host.MYD              procs_priv.MYI   time_zone_name.frm         user.MYD
event.frm         help_keyword.MYD   host.MYI              tables_priv.frm  time_zone_name.MYD         user.MYI
event.MYD         help_keyword.MYI   ndb_binlog_index.frm  tables_priv.MYD  time_zone_name.MYI
event.MYI         help_relation.frm  ndb_binlog_index.MYD  tables_priv.MYI  time_zone_transition.frm
func.frm          help_relation.MYD  ndb_binlog_index.MYI  time_zone.frm    time_zone_transition.MYD
roland@Rolenove:/opt/mysql/mysql-5.1.14$ 

 

Suggested fix:
- make mysql_install_db independant of whatever configuration that might hang around on the system. I have not been able to identify which of my settings in the my.cnf is responsible for the problem, but a few seem likely, such as setting the sql_mode 

- report any errors creating tables when running the mysql_install_db script. It's no fun discovering afterwards that the proc table is not there, and it should be noticed directly when running the script.
[3 Dec 2006 22:38] Roland Bouman
this my.cnf prevents mysql_install_db from proper installation

Attachment: my.cnf (application/octet-stream, text), 23.58 KiB.

[4 Dec 2006 0:03] Roland Bouman
Whoops! sorry I posted a duplicate of 23669
[4 Dec 2006 8:15] Sveta Smirnova
Thank you for the report.

Marked as duplicate of Bug #23669