Bug #64683 | installing with mysql_install_db fails with huge key-buffer | ||
---|---|---|---|
Submitted: | 18 Mar 2012 10:22 | Modified: | 9 Dec 2016 8:56 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Installing | Severity: | S1 (Critical) |
Version: | 5.6.5 | OS: | MacOS (10.7.3) |
Assigned to: | CPU Architecture: | Any | |
Tags: | installation, mysql_install_db |
[18 Mar 2012 10:22]
Giuseppe Maxia
[29 Apr 2012 2:46]
Denis TRUFFAUT
I got the same here. # MySQL - Install # ------------------------------------------------------------------------------ MYSQL_SHORT_VERSION='5.6' MYSQL_FULL_VERSION='5.6.5-m8' sudo rm -fr /usr/local/src/mysql-$MYSQL_FULL_VERSION sudo rm -fr /usr/local/mysql/data sudo mkdir -p /var/run sudo chmod -R 777 /var/run sudo mkdir -p /var/log/mysql sudo touch /var/log/mysql/slow.log sudo chown -R mysql:mysql /var/log/mysql sudo groupadd mysql # Create a mysql group sudo useradd -r -g mysql mysql # Create a mysql user and add it to the mysql group cd /usr/local/src sudo wget -O mysql-$MYSQL_FULL_VERSION.tar.gz "http://dev.mysql.com/get/Downloads/MySQL-$MYSQL_SHORT_VERSION/mysql-$MYSQL_FULL_VERSION.ta..." sudo tar -xvzf mysql-$MYSQL_FULL_VERSION.tar.gz sudo rm -fr mysql-$MYSQL_FULL_VERSION.tar.gz cd mysql-$MYSQL_FULL_VERSION # Bugfix - http://bugs.mysql.com/bug.php?id=61520 # Help urls don't fit in the help_topic table, leading HELP command to fail sudo grep -risl 'CREATE TABLE help_topic' * | xargs sudo sed -i -e 's/\(CREATE TABLE help_topic.\+\)128/\1175/' sudo grep -risl 'CREATE TABLE IF NOT EXISTS help_topic' * | xargs sudo sed -i -e 's/\(CREATE TABLE IF NOT EXISTS help_topic.\+\)128/\1175/' # Configure with Cmake # (Only UTF-8, static libs, LOAD DATA LOCAL INFILE, platform optimized...) # http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools # http://forge.mysql.com/wiki/CMake # http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html # http://www.lokris.net/doc/mysql/configure-options.html # http://code.google.com/p/lnmpp/source/browse/trunk/rpmbuild/SPECS/mysql-tcmalloc-5.1.59.sp... sudo rm -fr x86_64 sudo mkdir -p x86_64 # Create a dedicated directory for the build cd x86_64 # sudo cmake -DCMAKE_AR='/home/intel/bin/xiar' -DCMAKE_C_COMPILER='/home/intel/bin/icc' -DCMAKE_CXX_COMPILER='/home/intel/bin/icpc' -DCMAKE_C_FLAGS='-O3 -unroll2 -ip -m64 -restrict -no-prec-div -use-intel-optimized-headers' -DCMAKE_CXX_FLAGS='-O3 -unroll2 -ip -m64 -restrict -no-prec-div -use-intel-optimized-headers' -DWITH_MYSQLD_LDFLAGS='-all-static -ltcmalloc_minimal' -DWITH_CLIENT_LDFLAGS='-all-static -ltcmalloc_minimal' -DCGAL_C_FLAGS='-lstdc++' -DCGAL_CXX_FLAGS='-lstdc++' -DDISABLE_SHARED=1 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_unicode_ci -DWITH_EXTRA_CHARSETS=none -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLE_DOWNLOADS=1 .. && sudo make && sudo make install sudo cmake -DCMAKE_C_FLAGS='-O3 -unroll2 -march=native' -DCMAKE_CXX_FLAGS='-O3 -unroll2 -march=native' -DWITH_MYSQLD_LDFLAGS='-ltcmalloc_minimal' -DWITH_CLIENT_LDFLAGS='-ltcmalloc_minimal' -DDISABLE_SHARED=1 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_unicode_ci -DWITH_EXTRA_CHARSETS=none -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLE_DOWNLOADS=1 .. && sudo make && sudo make install #cmake .. -LA # Show all options ( echo ' # # http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html # http://www.facebook.com/note.php?note_id=10150190328375933 # SHOW ENGINE INNODB STATUS; # [mysql] # Client # ------------------------------------------------------------------------------ port = 3306 socket = /tmp/mysql.sock #loose-local-infile = 1 [mysqld] # General # ------------------------------------------------------------------------------ user = mysql default_storage_engine = InnoDB basedir = /usr/local/mysql datadir = /usr/local/mysql/data tmpdir = /var/tmp socket = /tmp/mysql.sock pid_file = /var/run/mysql.pid lc-messages-dir = /usr/local/mysql/share sql-mode = "STRICT_TRANS_TABLES,NO_AUTO_VALUE_ON_ZERO" skip-name-resolve # Binary logging # ------------------------------------------------------------------------------ #log_bin = /usr/local/mysql/data/mysql-bin server-id = 1 #binlog_format = ROW #expire_logs_days = 14 #sync_binlog = 1 # Core # ------------------------------------------------------------------------------ #sort_buffer_size = 64M tmp_table_size = 1000M max_heap_table_size = 1000M query_cache_type = 1 query_cache_size = 50M max_connections = 1000 back_log = 10000 thread_cache_size = 50 open_files_limit = 65535 table_definition_cache = 1024 table_open_cache = 2048 wait_timeout = 30 connect_timeout = 5 max_allowed_packet = 16M max_connect_errors = 1000000 transaction-isolation = READ-COMMITTED # MyISAM # ------------------------------------------------------------------------------ key_buffer_size = 32M myisam_recover = FORCE,BACKUP # InnoDB (http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html) # ------------------------------------------------------------------------------ innodb_strict_mode = 1 innodb_file_format = Barracuda innodb_flush_method = O_DIRECT innodb_flush_neighbors = 0 # Only for SSD innodb_data_file_path = ibdata1:10M:autoextend innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_io_capacity = 250 innodb_read_io_threads = 2 innodb_write_io_threads = 2 innodb_doublewrite = 0 innodb_read_ahead = 0 innodb_max_dirty_pages_pct = 80 innodb_lock_wait_timeout = 30 #innodb_ibuf_max_pct_of_buffer = 10 #innodb_ibuf_flush_pct = 40 innodb_support_xa = 0 # Slave:0, Master:1 innodb_flush_log_at_trx_commit = 2 # Slave:2, Master:1 innodb_file_per_table = 1 innodb_buffer_pool_size = 1G innodb_buffer_pool_instances = 4 innodb_thread_concurrency = 0 # 0-1000, 0:default (no limit) innodb_autoinc_lock_mode = 2 # 0, 1:default, 2:parralelize requests, but breaks statement-based replication, because order is non-deterministic (binary replication is ok) innodb_sync_spin_loops = 200 innodb_spin_wait_delay = 0 innodb_checksum_algorithm = strict_innodb # Logging # ------------------------------------------------------------------------------ log_error = /var/log/mysql/error.log log_queries_not_using_indexes = 1 slow_query_log = 1 slow_query_log_file = /var/log/mysql/slow.log [mysqldump] # Dump # ------------------------------------------------------------------------------ quick max_allowed_packet = 16M ' ) | sudo tee /etc/my.cnf > /dev/null cd /usr/local/mysql PATH=$PATH:/usr/local/mysql/bin sudo ps -C mysqld_safe -o pid='' | xargs sudo kill -9 sudo ps -C mysqld -o pid='' | xargs sudo kill -9 sudo scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --force --skip-name-resolve --lc-messages-dir='/usr/local/mysql/share'
[29 Apr 2012 2:48]
Denis TRUFFAUT
# ----------------------------------------- # The same bug # ----------------------------------------- Installing MySQL system tables... 120429 4:36:58 [Warning] The syntax '--language/-l' is deprecated and will be removed in a future release. Please use '--lc-messages-dir' instead. Installation of system tables failed! Examine the logs in /var/lib/mysql for more information. You can try to start the mysqld daemon with: shell> /usr/local/mysql/bin/mysqld --skip-grant-tables & and use the command line tool /usr/local/mysql/bin/mysql to connect to the mysql database and look at the grant tables: shell> /usr/local/mysql/bin/mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in /var/lib/mysql that may be helpful. Please consult the MySQL manual section 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source are the MySQL email archives available at http://lists.mysql.com/. Please check all of the above before mailing us! And remember, if you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!
[9 Dec 2016 8:56]
Terje Røsten
Posted by developer: Testing with 5.6.35 I am not able to reproduce: $ mysql_install_db --key-buffer-size=8M Installing MySQL system tables...2016-12-09 09:37:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-12-09 09:37:20 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2016-12-09 09:37:20 0 [Note] /usr/sbin/mysqld (mysqld 5.6.35) starting as process 3276 ... 2016-12-09 09:37:20 3276 [Note] InnoDB: Using atomics to ref count buffer pool pages 2016-12-09 09:37:20 3276 [Note] InnoDB: The InnoDB memory heap is disabled 2016-12-09 09:37:20 3276 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-12-09 09:37:20 3276 [Note] InnoDB: Memory barrier is not used 2016-12-09 09:37:20 3276 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-12-09 09:37:20 3276 [Note] InnoDB: Using Linux native AIO 2016-12-09 09:37:20 3276 [Note] InnoDB: Using CPU crc32 instructions 2016-12-09 09:37:20 3276 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2016-12-09 09:37:20 3276 [Note] InnoDB: Completed initialization of buffer pool 2016-12-09 09:37:20 3276 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created! 2016-12-09 09:37:20 3276 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB 2016-12-09 09:37:20 3276 [Note] InnoDB: Database physically writes the file full: wait... 2016-12-09 09:37:20 3276 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2016-12-09 09:37:20 3276 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2016-12-09 09:37:21 3276 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2016-12-09 09:37:21 3276 [Warning] InnoDB: New log files created, LSN=45781 2016-12-09 09:37:21 3276 [Note] InnoDB: Doublewrite buffer not found: creating new 2016-12-09 09:37:21 3276 [Note] InnoDB: Doublewrite buffer created 2016-12-09 09:37:21 3276 [Note] InnoDB: 128 rollback segment(s) are active. 2016-12-09 09:37:21 3276 [Warning] InnoDB: Creating foreign key constraint system tables. 2016-12-09 09:37:21 3276 [Note] InnoDB: Foreign key constraint system tables created 2016-12-09 09:37:21 3276 [Note] InnoDB: Creating tablespace and datafile system tables. 2016-12-09 09:37:21 3276 [Note] InnoDB: Tablespace and datafile system tables created. 2016-12-09 09:37:21 3276 [Note] InnoDB: Waiting for purge to start 2016-12-09 09:37:21 3276 [Note] InnoDB: 5.6.35 started; log sequence number 0 2016-12-09 09:37:23 3276 [Note] Binlog end 2016-12-09 09:37:23 3276 [Note] InnoDB: FTS optimize thread exiting. 2016-12-09 09:37:23 3276 [Note] InnoDB: Starting shutdown... 2016-12-09 09:37:24 3276 [Note] InnoDB: Shutdown completed; log sequence number 1625977 OK Filling help tables...2016-12-09 09:37:24 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-12-09 09:37:24 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap. 2016-12-09 09:37:24 0 [Note] /usr/sbin/mysqld (mysqld 5.6.35) starting as process 3298 ... 2016-12-09 09:37:24 3298 [Note] InnoDB: Using atomics to ref count buffer pool pages 2016-12-09 09:37:24 3298 [Note] InnoDB: The InnoDB memory heap is disabled 2016-12-09 09:37:24 3298 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-12-09 09:37:24 3298 [Note] InnoDB: Memory barrier is not used 2016-12-09 09:37:24 3298 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-12-09 09:37:24 3298 [Note] InnoDB: Using Linux native AIO 2016-12-09 09:37:24 3298 [Note] InnoDB: Using CPU crc32 instructions 2016-12-09 09:37:24 3298 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2016-12-09 09:37:24 3298 [Note] InnoDB: Completed initialization of buffer pool 2016-12-09 09:37:24 3298 [Note] InnoDB: Highest supported file format is Barracuda. 2016-12-09 09:37:24 3298 [Note] InnoDB: 128 rollback segment(s) are active. 2016-12-09 09:37:24 3298 [Note] InnoDB: Waiting for purge to start 2016-12-09 09:37:24 3298 [Note] InnoDB: 5.6.35 started; log sequence number 1625977 2016-12-09 09:37:24 3298 [Note] Binlog end 2016-12-09 09:37:24 3298 [Note] InnoDB: FTS optimize thread exiting. 2016-12-09 09:37:24 3298 [Note] InnoDB: Starting shutdown... 2016-12-09 09:37:26 3298 [Note] InnoDB: Shutdown completed; log sequence number 1625987 OK