I am working with revision 601 of 5.6 branch and all line numbers in the code are for this revision. The main issue I see here is in this error message during execution mysq_install_db: ERROR: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1. 2014-05-30 00:55:19 25139 [ERROR] Aborting I see at least three issues on different layers here: 1) If we look into scripts/mysql_install_db.pl.in lines 740-787 are responsible for invoking mysqld in bootstrap mode and feeding the following files to it: my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; The code use 'open(PIPE, "| $mysqld_install_cmd_line")' perl construction which allows easily work with pipes, but the return code of mysqld is not checked, so if something went wrong as in our case with mutually exclusive mysqld options mysql_install_db will ignore the error and continue the execution. I would propose to check the return value of perl "close" function when the pipe is closed. Here is the description how to check error code of the child on another side of pipe with "close": "If the filehandle came from a piped open, close returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, $! will be set to 0 . Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into $? and ${^CHILD_ERROR_NATIVE}." (http://perldoc.perl.org/functions/close.html) In the case of unexpected mysqld termination mysql_install_db should be stopped with corresponding error message. But this will not solve the issue completely. Imagine we have options in my.cnf which are not compatible with statements for creating and filling system tables. In this case mysql_install_db will fail and this will not allow to create and initialize data directory. At the other hand this can be right solution as changing some common rules or checks depending on suggestions about the purpose of server launching would be not obvious and sometimes confusing. The error message will give possibility to understand what exactly options are incompatible with bootstrap and fix them manually completely understanding the situation. 2) Here is the backtrace of mysqld when the error message is output during creating tables in mysql_install_db: #0 THD::is_ddl_gtid_compatible (this=0x1432340) at /tmp/1/5.6/sql/binlog.cc:8393 #1 0x00000000008709a5 in gtid_pre_statement_checks (thd=thd@entry=0x1432340) at /tmp/1/5.6/sql/rpl_gtid_execution.cc:301 #2 0x00000000006f37b2 in mysql_execute_command (thd=thd@entry=0x1432340) at /tmp/1/5.6/sql/sql_parse.cc:2797 #3 0x00000000006fa458 in mysql_parse (thd=0x1432340, rawbuf=, length=, parser_state=parser_state@entry=0x7fffe0087e70) at /tmp/1/5.6/sql/sql_parse.cc:6738 #4 0x00000000006fa684 in handle_bootstrap_impl (thd=0x1432340) at /tmp/1/5.6/sql/sql_parse.cc:790 #5 0x00000000006fab1b in do_handle_bootstrap (thd=thd@entry=0x1432340) at /tmp/1/5.6/sql/sql_parse.cc:845 #6 0x00000000006fac30 in handle_bootstrap (arg=0x1432340) at /tmp/1/5.6/sql/sql_parse.cc:822 #7 0x00007ffff737d182 in start_thread (arg=0x7fffe008d700) at pthread_create.c:312 #8 0x00007ffff688a30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Here is the code which checks conditions and output error message: bool THD::is_ddl_gtid_compatible() const { ... if ((lex->sql_command == SQLCOM_CREATE_TABLE && (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) != 0) || (lex->sql_command == SQLCOM_DROP_TABLE && lex->drop_temporary)) { /* [CREATE|DROP] TEMPORARY TABLE is unsafe to execute inside a transaction because the table will stay and the transaction will be written to the slave's binary log with the GTID even if the transaction is rolled back. */ if (in_multi_stmt_transaction_mode()) { my_error(ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION, MYF(0)); DBUG_RETURN(false); } } ... } Here is the query on which the error takes place: CREATE TEMPORARY TABLE tmp_db LIKE db; This query is from "scripts/mysql_system_tables_data.sql". The behaviour of the code and explanations in the code comments are quite reasonable here. But this happens during creating and filling system tables. my.cnf can contain such parameters and mysqld will always abort execution due to incompatibility of mysqld options with statements for system tables creating and initialization. We could disable checking statement for GTID compatibility in the case if "bootstrap" option is on here: int mysql_execute_command(THD *thd) { ... switch (gtid_pre_statement_checks(thd)) { case GTID_STATEMENT_EXECUTE: break; case GTID_STATEMENT_CANCEL: DBUG_RETURN(-1); case GTID_STATEMENT_SKIP: my_ok(thd); DBUG_RETURN(0); } ... } But I don't think this is correct solution as binlog can be read by slaves and the situation which is warned about in THD::is_ddl_gtid_compatible() comments can take place. 3) Here is the backtrace of crash during connect to server after mysql_install_db is finished: Program received signal SIGFPE, Arithmetic exception. [Switching to Thread 0x7fffca101700 (LWP 30964)] find_mpvio_user (mpvio=mpvio@entry=0x7fffca1004c0) at /tmp/1/5.6/sql/sql_acl.cc:10254 10254 uint i= nr1 % acl_users.elements; (gdb) bt #0 find_mpvio_user (mpvio=mpvio@entry=0x7fffca1004c0) at /tmp/1/5.6/sql/sql_acl.cc:10254 #1 0x0000000000699dd1 in parse_client_handshake_packet (mpvio=mpvio@entry=0x7fffca1004c0, buff=buff@entry=0x7fffca100130, pkt_len=) at /tmp/1/5.6/sql/sql_acl.cc:10997 #2 0x000000000069a0be in server_mpvio_read_packet (param=0x7fffca1004c0, buf=0x7fffca100130) at /tmp/1/5.6/sql/sql_acl.cc:11214 #3 0x00000000006869d9 in native_password_authenticate (vio=0x7fffca1004c0, info=0x7fffca1004d8) at /tmp/1/5.6/sql/sql_acl.cc:11888 #4 0x0000000000685f94 in do_auth_once (thd=thd@entry=0x1979210, auth_plugin_name=auth_plugin_name@entry=0x7fffca1002f0, mpvio=mpvio@entry=0x7fffca1004c0) at /tmp/1/5.6/sql/sql_acl.cc:11393 #5 0x000000000069a416 in acl_authenticate (thd=thd@entry=0x1979210, com_change_user_pkt_len=com_change_user_pkt_len@entry=0) at /tmp/1/5.6/sql/sql_acl.cc:11536 #6 0x00000000006c74b3 in check_connection (thd=thd@entry=0x1979210) at /tmp/1/5.6/sql/sql_connect.cc:1212 #7 0x00000000006c8f72 in login_connection (thd=thd@entry=0x1979210) at /tmp/1/5.6/sql/sql_connect.cc:1282 #8 0x00000000006c96c4 in thd_prepare_connection (thd=0x1979210) at /tmp/1/5.6/sql/sql_connect.cc:1451 #9 0x00000000006c99e6 in do_handle_one_connection (thd_arg=thd_arg@entry=0x1979210) at /tmp/1/5.6/sql/sql_connect.cc:1522 #10 0x00000000006c9b00 in handle_one_connection (arg=arg@entry=0x1979210) at /tmp/1/5.6/sql/sql_connect.cc:1443 #11 0x000000000097b2b3 in pfs_spawn_thread (arg=0x1a25e80) at /tmp/1/5.6/storage/perfschema/pfs.cc:1860 #12 0x00007ffff737d182 in start_thread (arg=0x7fffca101700) at pthread_create.c:312 #13 0x00007ffff688a30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 In the case if array "acl_users" is empty there must not be dividing by zero. In this case we should inform about the error and return 1 as in code here: static bool find_mpvio_user(MPVIO_EXT *mpvio) { ... if (my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str, native_password_plugin_name.str) != 0 && my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str, old_password_plugin_name.str) != 0 && !(mpvio->client_capabilities & CLIENT_PLUGIN_AUTH)) { /* user account requires non-default plugin and the client is too old */ DBUG_ASSERT(my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str, native_password_plugin_name.str)); DBUG_ASSERT(my_strcasecmp(system_charset_info, mpvio->acl_user->plugin.str, old_password_plugin_name.str)); my_error(ER_NOT_SUPPORTED_AUTH_MODE, MYF(0)); general_log_print(current_thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE)); DBUG_RETURN (1); } ... } Summary: I would fix 1 and 2 as proposed in descriptions above. But in this case there will be impossible to create and initialize data dir with existing my.cnf. The sequence will be the following: invoke mysql_install_db, get error message, comment out corresponding options in my.cnf, invoke mysql_install_db once more, revert changes in my.cnf, launch server.